diff options
| author | Dan Engelbrecht <[email protected]> | 2023-10-30 09:32:54 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-30 09:32:54 +0100 |
| commit | 3a6a5855cf36967c6bde31292669bfaf832c6f0b (patch) | |
| tree | 593e7c21e6840e7ad312207fddc63e1934e19d85 /src/zenstore/filecas.h | |
| parent | set up arch properly when running tests (mac) (#505) (diff) | |
| download | zen-3a6a5855cf36967c6bde31292669bfaf832c6f0b.tar.xz zen-3a6a5855cf36967c6bde31292669bfaf832c6f0b.zip | |
New GC implementation (#459)
- Feature: New garbage collection implementation, still in evaluation mode. Enabled by `--gc-v2` command line option
Diffstat (limited to 'src/zenstore/filecas.h')
| -rw-r--r-- | src/zenstore/filecas.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/zenstore/filecas.h b/src/zenstore/filecas.h index ea7ff8e8c..2e9a1d5dc 100644 --- a/src/zenstore/filecas.h +++ b/src/zenstore/filecas.h @@ -27,7 +27,7 @@ class BasicFile; /** CAS storage strategy using a file-per-chunk storage strategy */ -struct FileCasStrategy final : public GcStorage +struct FileCasStrategy final : public GcStorage, public GcReferenceStore { FileCasStrategy(GcManager& Gc); ~FileCasStrategy(); @@ -44,6 +44,8 @@ struct FileCasStrategy final : public GcStorage virtual void CollectGarbage(GcContext& GcCtx) override; virtual GcStorageSize StorageSize() const override; + virtual GcReferencePruner* CreateReferencePruner(GcCtx& Ctx) override; + private: void MakeIndexSnapshot(); uint64_t ReadIndexFile(const std::filesystem::path& IndexPath, uint32_t& OutVersion); @@ -97,6 +99,9 @@ private: size_t Shard2len = 0; ExtendablePathBuilder<128> ShardedPath; }; + + friend class FileCasReferencePruner; + friend class FileCasStoreCompactor; }; void filecas_forcelink(); |