diff options
| author | Per Larsson <[email protected]> | 2021-12-14 09:41:04 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-12-14 09:41:04 +0100 |
| commit | 5f8136b25040046c466c95cbec3874594ff91d0c (patch) | |
| tree | b6cdbf23a5074c18ed7565e8c81709a9df350c0c /zenstore/gc.cpp | |
| parent | Remove Cid to CAS chunk mapping after GC. (diff) | |
| download | zen-5f8136b25040046c466c95cbec3874594ff91d0c.tar.xz zen-5f8136b25040046c466c95cbec3874594ff91d0c.zip | |
Fixed bug in z$ service returning partial cache records and enable small object GC by default.
Diffstat (limited to 'zenstore/gc.cpp')
| -rw-r--r-- | zenstore/gc.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zenstore/gc.cpp b/zenstore/gc.cpp index d5cb4901b..307adc04e 100644 --- a/zenstore/gc.cpp +++ b/zenstore/gc.cpp @@ -268,6 +268,10 @@ CasGc::CollectGarbage(GcContext& GcCtx) Contributor->GatherReferences(GcCtx); } + // Cache records reference CAS chunks with the uncompressed + // raw hash (Cid). Map the content ID to CAS hash to enable + // the CAS storage backends to filter valid chunks. + if (CidStore* CidStore = m_CidStore) { std::vector<IoHash> CasHashes; @@ -301,6 +305,8 @@ CasGc::CollectGarbage(GcContext& GcCtx) Storage->CollectGarbage(GcCtx); } + // Remove Cid to CAS hash mappings. Scrub? + if (CidStore* CidStore = m_CidStore) { CidStore->RemoveCids(GcCtx.DeletedCas()); |