[space-maps/disk] Support ignoring broken bitmaps on counting index_store

This commit is contained in:
Ming-Hung Tsai 2020-08-17 14:10:55 +08:00
parent 27ca8cc009
commit 3c49949796

View File

@ -666,9 +666,14 @@ namespace {
if (!ie.blocknr_)
return;
block_manager::read_ref rr = tm_.read_lock(ie.blocknr_, bitmap_validator_);
if (rr.data())
bc_.inc(ie.blocknr_);
try {
block_manager::read_ref rr = tm_.read_lock(ie.blocknr_, bitmap_validator_);
if (rr.data())
bc_.inc(ie.blocknr_);
} catch (std::exception &e) {
if (bc_.stop_on_error())
throw;
}
}
private: