aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zenstore/compactcas.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/zenstore/compactcas.cpp b/zenstore/compactcas.cpp
index dc16305d0..b951ac0b3 100644
--- a/zenstore/compactcas.cpp
+++ b/zenstore/compactcas.cpp
@@ -449,9 +449,7 @@ CasContainerStrategy::CollectGarbage(GcContext& GcCtx)
DeleteChunks.back().reserve(GuesstimateCountPerBlock);
}
- const bool PerformDelete = GcCtx.IsDeletionMode() && GcCtx.CollectSmallObjects();
uint64_t DeleteCount = {};
- uint64_t MoveCount = {};
uint64_t NewTotalSize = 0;
GcCtx.FilterCas(TotalChunkHashes, [&](const IoHash& ChunkHash, bool Keep) {
@@ -473,6 +471,7 @@ CasContainerStrategy::CollectGarbage(GcContext& GcCtx)
}
});
+ const bool PerformDelete = GcCtx.IsDeletionMode() && GcCtx.CollectSmallObjects();
if (!PerformDelete)
{
uint64_t TotalSize = m_TotalSize.load(std::memory_order_relaxed);
@@ -491,9 +490,8 @@ CasContainerStrategy::CollectGarbage(GcContext& GcCtx)
uint64_t WriteOffset = {};
uint32_t NewBlockIndex = {};
std::vector<IoHash> DeletedChunks;
+ std::vector<IoHash> MovedChunks;
DeletedChunks.reserve(DeleteCount);
- std::vector<IoHash> MovedChunks;
- DeletedChunks.reserve(MoveCount);
std::unordered_map<IoHash, BlockStoreDiskLocation> MovedBlockChunks;
for (auto BlockIndex : BlocksToReWrite)