Fix mis-spoken assert on prefetch_filter and prefetch_index (#4077)

Summary:
We can have prefetch_index without prefetch_filter but not the other way around. The assert statement is fixed.
Closes https://github.com/facebook/rocksdb/pull/4077

Differential Revision: D8694472

Pulled By: maysamyabandeh

fbshipit-source-id: ccd2804d9d9cdafb1c3e65062c7bc38603e69004
main
Maysam Yabandeh 6 years ago committed by Facebook Github Bot
parent 29ffbb8a50
commit 2462763b2e
  1. 2
      table/block_based_table_reader.cc

@ -941,7 +941,7 @@ Status BlockBasedTable::Open(const ImmutableCFOptions& ioptions,
prefetch_all || (table_options.pin_top_level_index_and_filter &&
rep->filter_type == Rep::FilterType::kPartitionedFilter);
// Partition fitlers cannot be enabled without partition indexes
assert(!prefetch_index || prefetch_filter);
assert(!prefetch_filter || prefetch_index);
// pin both index and filters, down to all partitions
const bool pin_all =
rep->table_options.pin_l0_filter_and_index_blocks_in_cache && level == 0;

Loading…
Cancel
Save