Fix segmentation fault caused by #1961
Summary: Fixes #1961 which causes a segfault when filter_policy is nullptr and both pin_l0_filter_and_index_blocks_in_cache/cache_index_and_filter_blocks are set. Closes https://github.com/facebook/rocksdb/pull/2029 Differential Revision: D4764862 Pulled By: maysamyabandeh fbshipit-source-id: 05bd695
This commit is contained in:
parent
8dee8cad9e
commit
34a70859bc
@ -732,7 +732,9 @@ Status BlockBasedTable::Open(const ImmutableCFOptions& ioptions,
|
||||
if (rep->table_options.pin_l0_filter_and_index_blocks_in_cache &&
|
||||
level == 0) {
|
||||
rep->filter_entry = filter_entry;
|
||||
if (rep->filter_entry.value != nullptr) {
|
||||
rep->filter_entry.value->SetLevel(level);
|
||||
}
|
||||
} else {
|
||||
filter_entry.Release(table_options.block_cache.get());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user