aboutsummaryrefslogtreecommitdiff
path: root/zenstore/gc.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-12-14 09:41:04 +0100
committerPer Larsson <[email protected]>2021-12-14 09:41:04 +0100
commit5f8136b25040046c466c95cbec3874594ff91d0c (patch)
treeb6cdbf23a5074c18ed7565e8c81709a9df350c0c /zenstore/gc.cpp
parentRemove Cid to CAS chunk mapping after GC. (diff)
downloadzen-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.cpp6
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());