aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-10-23 10:47:49 +0200
committerGitHub <[email protected]>2023-10-23 10:47:49 +0200
commit4b4229e3c3da530e3885ef666fea1c3200aa77de (patch)
tree978ecae501777c2baf54951f7107afc6f45dd76c /src/zenstore/include
parentFilter expired cache entries against ExpiredKeys - not CAS entries to retain ... (diff)
downloadzen-4b4229e3c3da530e3885ef666fea1c3200aa77de.tar.xz
zen-4b4229e3c3da530e3885ef666fea1c3200aa77de.zip
Remove any unreferenced blocks in block store on open (#492)
* Remove any unreferenced blocks in block store on open
Diffstat (limited to 'src/zenstore/include')
-rw-r--r--src/zenstore/include/zenstore/blockstore.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/zenstore/include/zenstore/blockstore.h b/src/zenstore/include/zenstore/blockstore.h
index 48d33edbc..56906f570 100644
--- a/src/zenstore/include/zenstore/blockstore.h
+++ b/src/zenstore/include/zenstore/blockstore.h
@@ -132,9 +132,8 @@ public:
void Initialize(const std::filesystem::path& BlocksBasePath, uint64_t MaxBlockSize, uint64_t MaxBlockCount);
// Ask the store to create empty blocks for all locations that does not have a block
- // This is to make sure we don't have locations that points to a block that will be written
- // in the future which would result in us getting garbage data
- void CreateMissingBlocks(const std::vector<BlockStoreLocation>& KnownLocations);
+ // Remove any block that is not referenced
+ void SyncExistingBlocksOnDisk(const std::vector<BlockStoreLocation>& KnownLocations);
void Close();