aboutsummaryrefslogtreecommitdiff
path: root/pw_kvs/key_value_store_test.cc
diff options
context:
space:
mode:
authorDavid Rogers <davidrogers@google.com>2020-03-08 19:21:40 -0700
committerCQ Bot Account <commit-bot@chromium.org>2020-03-10 23:18:58 +0000
commitf3884eb9d4e45933f32f95445f3e8f97db990a17 (patch)
tree116bbc43331477c97f4899637bc90bcd057391b6 /pw_kvs/key_value_store_test.cc
parentba4de1c27afb1a9ce150a4d27ede8ae2d492f12c (diff)
downloadpigweed-f3884eb9d4e45933f32f95445f3e8f97db990a17.tar.gz
pw_kvs: Fix garbage collection for redundant entries
Fix garbage collection when using redudant entries. - Improve "find sector to write entry to" and "find sector to GC" algorithms so they work better with redundant entries. - Add support in GC to be aware of partially written keys, where the first entry is written to flash, but GC is needed to free space for the redundant entries to have space to be written. Tested with kEntryRedundancy up to 2. Change-Id: Iff88d970714fa1ece634af926a1838a5f7d5d7e7
Diffstat (limited to 'pw_kvs/key_value_store_test.cc')
-rw-r--r--pw_kvs/key_value_store_test.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw_kvs/key_value_store_test.cc b/pw_kvs/key_value_store_test.cc
index 9d0e3d486..32716a9ee 100644
--- a/pw_kvs/key_value_store_test.cc
+++ b/pw_kvs/key_value_store_test.cc
@@ -156,7 +156,7 @@ typedef FlashWithPartitionFake<4 * 128 /*sector size*/, 6 /*sectors*/> Flash;
#if USE_MEMORY_BUFFER
// Although it might be useful to test other configurations, some tests require
// at least 3 sectors; therfore it should have this when checked in.
-FakeFlashBuffer<4 * 1024, 4> test_flash(
+FakeFlashBuffer<4 * 1024, 6> test_flash(
16); // 4 x 4k sectors, 16 byte alignment
FlashPartition test_partition(&test_flash, 0, test_flash.sector_count());
FakeFlashBuffer<1024, 60> large_test_flash(8);