aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-06-30 12:07:36 +0200
committerStefan Boberg <[email protected]>2023-06-30 12:07:36 +0200
commit080c9f8b25cb0e65616286524de2f2aca6f1a77d (patch)
tree711c10114111caed0d7604a93a0e254034534d40 /src/zenstore/include
parentclang-format :( (diff)
downloadzen-080c9f8b25cb0e65616286524de2f2aca6f1a77d.tar.xz
zen-080c9f8b25cb0e65616286524de2f2aca6f1a77d.zip
CidStore now implements the ChunkResolver interface
this allows client code to use the ChunkResolver interface instead of CidStore, which can help with testing scenarios
Diffstat (limited to 'src/zenstore/include')
-rw-r--r--src/zenstore/include/zenstore/blockstore.h3
-rw-r--r--src/zenstore/include/zenstore/cidstore.h18
2 files changed, 12 insertions, 9 deletions
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<uint32_t> 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);