Allow intentionally swallowed errors in BlockBasedFilterBlockReader (#8695)

Summary:
To avoid getting "Didn't get expected error from Get" from
crash test by enabling block-based filter in crash test in https://github.com/facebook/rocksdb/issues/8679.
Basically, this applies the pattern of IGNORE_STATUS_IF_ERROR in
full_filter_block.cc to block_based_filter_block.cc

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8695

Test Plan: watch for resolution of crash test runs

Reviewed By: ltamasi

Differential Revision: D30496748

Pulled By: pdillinger

fbshipit-source-id: f7808fcf14c0e787fe81da03fa8303244590d273
This commit is contained in:
Peter Dillinger 2021-08-23 15:49:27 -07:00 committed by Levi Tamasi
parent 87b20cbba0
commit 3a3f4801d0

View File

@ -257,6 +257,7 @@ bool BlockBasedFilterBlockReader::MayMatch(
const Status s =
GetOrReadFilterBlock(no_io, get_context, lookup_context, &filter_block);
if (!s.ok()) {
IGNORE_STATUS_IF_ERROR(s);
return true;
}
@ -315,6 +316,7 @@ std::string BlockBasedFilterBlockReader::ToString() const {
GetOrReadFilterBlock(false /* no_io */, nullptr /* get_context */,
nullptr /* lookup_context */, &filter_block);
if (!s.ok()) {
IGNORE_STATUS_IF_ERROR(s);
return std::string("Unable to retrieve filter block");
}