Sanitize partitioning options

Summary:
We currently do not support partitioning filters if indexes are not partitioned. The patch makes sure that these two are consistent.
Closes https://github.com/facebook/rocksdb/pull/2455

Differential Revision: D5275644

Pulled By: maysamyabandeh

fbshipit-source-id: b61701ac8914c2206d06f5e33ff6f67b24406d1d
main
Maysam Yabandeh 8 years ago committed by Facebook Github Bot
parent 521724ba82
commit 0ac4afb975
  1. 6
      table/block_based_table_factory.cc

@ -47,6 +47,12 @@ BlockBasedTableFactory::BlockBasedTableFactory(
if (table_options_.index_block_restart_interval < 1) {
table_options_.index_block_restart_interval = 1;
}
if (table_options_.partition_filters &&
table_options_.index_type !=
BlockBasedTableOptions::kTwoLevelIndexSearch) {
// We do not support partitioned filters without partitioning indexes
table_options_.partition_filters = false;
}
}
Status BlockBasedTableFactory::NewTableReader(

Loading…
Cancel
Save