aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/zenstore/blockstore.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/zenstore/blockstore.cpp b/src/zenstore/blockstore.cpp
index 378d9fd52..0593ff06b 100644
--- a/src/zenstore/blockstore.cpp
+++ b/src/zenstore/blockstore.cpp
@@ -481,10 +481,14 @@ BlockStore::ReclaimSpace(const ReclaimSnapshotState& Snapshot,
if (!OldBlockFile)
{
// If the block file pointed to does not exist, move them all to deleted list
- BlockDeleteChunks[ChunkMapIndex].insert(BlockDeleteChunks[ChunkMapIndex].end(),
- BlockKeepChunks[ChunkMapIndex].begin(),
- BlockKeepChunks[ChunkMapIndex].end());
- BlockKeepChunks[ChunkMapIndex].clear();
+ ChunkIndexArray& KeepMap = BlockKeepChunks[ChunkMapIndex];
+ ZEN_ERROR("Expected to find block {} in {} - this should never happen, marking {} entries as deleted.",
+ BlockIndex,
+ m_BlocksBasePath,
+ KeepMap.size());
+
+ BlockDeleteChunks[ChunkMapIndex].insert(BlockDeleteChunks[ChunkMapIndex].end(), KeepMap.begin(), KeepMap.end());
+ KeepMap.clear();
}
const ChunkIndexArray& KeepMap = BlockKeepChunks[ChunkMapIndex];