From 2462763b2e77067936b97e7ef661356f3fd649ce Mon Sep 17 00:00:00 2001 From: Maysam Yabandeh Date: Fri, 29 Jun 2018 09:13:57 -0700 Subject: [PATCH] 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 --- table/block_based_table_reader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/table/block_based_table_reader.cc b/table/block_based_table_reader.cc index ba5ed309d..20a6fd64c 100644 --- a/table/block_based_table_reader.cc +++ b/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;