From ee5fcbce34eaef87ffced2a993c8443af4af4fe2 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Fri, 14 Jun 2024 22:12:57 +0200 Subject: don't assert that we have moved bytes if source block is zero size (#97) * don't assert that we have moved bytes if source block is zero size * handle invalid session ids gracefully --- src/zenstore/blockstore.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/zenstore/blockstore.cpp') diff --git a/src/zenstore/blockstore.cpp b/src/zenstore/blockstore.cpp index 6e289409c..4b650e2d5 100644 --- a/src/zenstore/blockstore.cpp +++ b/src/zenstore/blockstore.cpp @@ -1382,7 +1382,8 @@ BlockStore::CompactBlocks(const BlockStoreCompactState& CompactState, MovedSize += NewBlockSize; NewBlockFile = nullptr; - ZEN_ASSERT(!MovedChunks.empty() || RemovedSize > 0); // We should not have a new block if we haven't moved anything + ZEN_ASSERT(!MovedChunks.empty() || + (RemovedSize > 0 || OldBlockSize == 0)); // We should not have a new block if we haven't moved anything ZEN_INFO("{}wrote block {} ({})", LogPrefix, -- cgit v1.2.3