Add asserts to catch "BUG: Attempt to overwrite used offset"

This commit is contained in:
Vitaliy Filippov
2024-02-20 15:56:48 +03:00
parent 6cfe38ec04
commit ea73857450
4 changed files with 33 additions and 6 deletions
+1 -1
View File
@@ -215,7 +215,7 @@ void blockstore_impl_t::erase_dirty(blockstore_dirty_db_t::iterator dirty_start,
#endif
data_alloc->set(dirty_it->second.location >> dsk.block_order, false);
}
auto used = --journal.used_sectors[dirty_it->second.journal_sector];
auto used = --journal.used_sectors.at(dirty_it->second.journal_sector);
#ifdef BLOCKSTORE_DEBUG
printf(
"remove usage of journal offset %08lx by %lx:%lx v%lu (%lu refs)\n", dirty_it->second.journal_sector,