diff options
Diffstat (limited to 'src/zenstore/compactcas.cpp')
| -rw-r--r-- | src/zenstore/compactcas.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/zenstore/compactcas.cpp b/src/zenstore/compactcas.cpp index 15f80d4cf..e0a7900f1 100644 --- a/src/zenstore/compactcas.cpp +++ b/src/zenstore/compactcas.cpp @@ -867,9 +867,9 @@ public: NiceTimeSpanMs(Timer.GetElapsedTimeMs())); }); - std::vector<IoHash> UnusedCids = GetUnusedReferences(m_Cids); - Stats.CheckedCount = m_Cids.size(); - Stats.FoundCount = UnusedCids.size(); + std::span<IoHash> UnusedCids = GetUnusedReferences(m_Cids); + Stats.CheckedCount = m_Cids.size(); + Stats.FoundCount = UnusedCids.size(); if (UnusedCids.empty()) { @@ -967,7 +967,11 @@ CasContainerStrategy::CreateReferencePruner(GcCtx& Ctx, GcReferenceStoreStats&) CidsToCheck.push_back(It.first); } } - return new CasContainerReferencePruner(*this, std::move(CidsToCheck)); + if (FilterReferences(Ctx, CidsToCheck)) + { + return new CasContainerReferencePruner(*this, std::move(CidsToCheck)); + } + return nullptr; } void @@ -2018,7 +2022,7 @@ TEST_CASE_TEMPLATE("compactcas.threadedinsert", GCV2, FalseType, TrueType) HashKeySet Deleted; GcStats Stats; GcStoreCompactor* Compactor = - Pruner->RemoveUnreferencedData(Ctx, Stats, [&](std::span<IoHash> References) -> std::vector<IoHash> { + Pruner->RemoveUnreferencedData(Ctx, Stats, [&](std::span<IoHash> References) -> std::span<IoHash> { std::vector<IoHash> Unreferenced; HashKeySet Retain; Retain.AddHashesToSet(KeepHashes); |