diff --git a/HISTORY.md b/HISTORY.md index 1781d64a7..96214c43c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -8,6 +8,7 @@ ### Bug Fixes * Fixed Get correctness bug in the presence of range tombstones where merge operands covered by a range tombstone always result in NotFound. * Start populating `NO_FILE_CLOSES` ticker statistic, which was always zero previously. +* The default value of NewBloomFilterPolicy()'s argument use_block_based_builder is changed to false. Note that this new default may cause large temp memory usage when building very large SST files. ## 5.18.0 (11/12/2018) ### New Features diff --git a/db/db_block_cache_test.cc b/db/db_block_cache_test.cc index ac8c2825e..0cefef3bb 100644 --- a/db/db_block_cache_test.cc +++ b/db/db_block_cache_test.cc @@ -349,7 +349,7 @@ TEST_F(DBBlockCacheTest, IndexAndFilterBlocksStats) { // 200 bytes are enough to hold the first two blocks std::shared_ptr cache = NewLRUCache(200, 0, false); table_options.block_cache = cache; - table_options.filter_policy.reset(NewBloomFilterPolicy(20)); + table_options.filter_policy.reset(NewBloomFilterPolicy(20, true)); options.table_factory.reset(new BlockBasedTableFactory(table_options)); CreateAndReopenWithCF({"pikachu"}, options); diff --git a/include/rocksdb/filter_policy.h b/include/rocksdb/filter_policy.h index 4e1dc3bfc..9c0904456 100644 --- a/include/rocksdb/filter_policy.h +++ b/include/rocksdb/filter_policy.h @@ -145,6 +145,6 @@ class FilterPolicy { // ignores trailing spaces, it would be incorrect to use a // FilterPolicy (like NewBloomFilterPolicy) that does not ignore // trailing spaces in keys. -extern const FilterPolicy* NewBloomFilterPolicy(int bits_per_key, - bool use_block_based_builder = true); +extern const FilterPolicy* NewBloomFilterPolicy( + int bits_per_key, bool use_block_based_builder = false); }