diff options
| author | Dan Engelbrecht <[email protected]> | 2023-04-27 14:18:18 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-27 14:18:18 +0200 |
| commit | e6a82b1438dce4e62f605ee74cf8e1d6c932d59c (patch) | |
| tree | 60be84d99f1fe4eec94d13c73f0c1a25119c312a /zenstore/blockstore.cpp | |
| parent | v0.2.7 (diff) | |
| download | zen-e6a82b1438dce4e62f605ee74cf8e1d6c932d59c.tar.xz zen-e6a82b1438dce4e62f605ee74cf8e1d6c932d59c.zip | |
bugfixes (#261)
* Don't try to GC if now blocks to GC was found, regardless if we have locations in memory
* Don't let exception leak from scope guard as throw in destructor will abort application
* changelog
Diffstat (limited to 'zenstore/blockstore.cpp')
| -rw-r--r-- | zenstore/blockstore.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zenstore/blockstore.cpp b/zenstore/blockstore.cpp index 2894244fe..9738df729 100644 --- a/zenstore/blockstore.cpp +++ b/zenstore/blockstore.cpp @@ -353,6 +353,11 @@ BlockStore::ReclaimSpace(const ReclaimSnapshotState& Snapshot, }); size_t BlockCount = Snapshot.BlockCount; + if (BlockCount == 0) + { + ZEN_DEBUG("garbage collect for '{}' SKIPPED, no blocks to process", m_BlocksBasePath); + return; + } std::unordered_set<size_t> KeepChunkMap; KeepChunkMap.reserve(KeepChunkIndexes.size()); |