From 080c9f8b25cb0e65616286524de2f2aca6f1a77d Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 30 Jun 2023 12:07:36 +0200 Subject: CidStore now implements the ChunkResolver interface this allows client code to use the ChunkResolver interface instead of CidStore, which can help with testing scenarios --- src/zenstore/include/zenstore/blockstore.h | 3 +++ src/zenstore/include/zenstore/cidstore.h | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'src/zenstore/include') diff --git a/src/zenstore/include/zenstore/blockstore.h b/src/zenstore/include/zenstore/blockstore.h index a8bd44b9b..edd6df5a2 100644 --- a/src/zenstore/include/zenstore/blockstore.h +++ b/src/zenstore/include/zenstore/blockstore.h @@ -111,6 +111,9 @@ private: class BlockStore { public: + BlockStore(); + ~BlockStore(); + struct ReclaimSnapshotState { std::unordered_set m_ActiveWriteBlocks; diff --git a/src/zenstore/include/zenstore/cidstore.h b/src/zenstore/include/zenstore/cidstore.h index 79f906307..38815ed15 100644 --- a/src/zenstore/include/zenstore/cidstore.h +++ b/src/zenstore/include/zenstore/cidstore.h @@ -21,14 +21,6 @@ class CompressedBuffer; class IoBuffer; class ScrubContext; -/** Content Store - * - * Data in the content store is referenced by content identifiers (CIDs), it works - * with compressed buffers so the CID is expected to be the RAW hash. It stores the - * chunk directly under the RAW hash. - * - */ - struct CidStoreSize { uint64_t TinySize = 0; @@ -49,7 +41,15 @@ struct CidStoreConfiguration uint64_t HugeValueThreshold = 1024 * 1024; }; -class CidStore +/** Content Store + * + * Data in the content store is referenced by content identifiers (CIDs), it works + * with compressed buffers so the CID is expected to be the RAW hash. It stores the + * chunk directly under the RAW hash. + * + */ + +class CidStore final : public ChunkResolver { public: CidStore(GcManager& Gc); -- cgit v1.2.3