rocksdb/table/block_based
Peter Dillinger 1c6faf3587 Make RibbonFilterPolicy::bloom_before_level mutable (SetOptions()) (#11838)
Summary:
An internal user wants to be able to dynamically switch between Bloom and Ribbon filters, without a custom FilterPolicy. Making `filter_policy` mutable would actually make issue https://github.com/facebook/rocksdb/issues/10079 worse, because it would be a race on a pointer field, not just on scalars.

As a reasonable compromise until that is fixed, I am enabling dynamic control over Bloom vs. Ribbon choice by making
RibbonFilterPolicy::bloom_before_level mutable, and doing that safely by using an atomic.

I've also slightly tweaked the interpretation of that field so that setting it to INT_MAX really means "always Bloom."

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11838

Test Plan: unit tests added/extended. crash test updated for SetOptions call and tested under TSAN with amplified probability (lower set_options_one_in).

Reviewed By: ajkr

Differential Revision: D49296284

Pulled By: pdillinger

fbshipit-source-id: e4251c077510df9a9c719876f482448c0d15402a
2023-09-15 15:46:10 -07:00
..
binary_search_index_reader.cc
binary_search_index_reader.h
block.cc PutEntity Support in SST File Writer (#11688) 2023-08-10 18:16:10 -07:00
block.h
block_based_table_builder.cc Add CompressionOptions::checksum for enabling ZSTD checksum (#11666) 2023-08-18 15:01:59 -07:00
block_based_table_builder.h
block_based_table_factory.cc
block_based_table_factory.h
block_based_table_iterator.cc Fix seg fault in auto_readahead_size during IOError (#11761) 2023-08-25 13:50:48 -07:00
block_based_table_iterator.h Implement trimming of readhead size when upper bound is specified (#11684) 2023-08-18 15:52:04 -07:00
block_based_table_reader.cc Add new Iterator API Refresh(const snapshot*) (#10594) 2023-09-15 10:44:43 -07:00
block_based_table_reader.h Add new Iterator API Refresh(const snapshot*) (#10594) 2023-09-15 10:44:43 -07:00
block_based_table_reader_impl.h
block_based_table_reader_sync_and_async.h Group rocksdb.sst.read.micros stat by different user read IOActivity + misc (#11444) 2023-08-08 17:26:50 -07:00
block_based_table_reader_test.cc
block_builder.cc
block_builder.h
block_cache.cc
block_cache.h
block_prefetcher.cc Implement trimming of readhead size when upper bound is specified (#11684) 2023-08-18 15:52:04 -07:00
block_prefetcher.h Update upper_bound_offset when reseek changes iterate_upper_bound dynamically (#11775) 2023-09-15 10:05:56 -07:00
block_prefix_index.cc
block_prefix_index.h
block_test.cc
block_type.h
cachable_entry.h
data_block_footer.cc
data_block_footer.h
data_block_hash_index.cc
data_block_hash_index.h
data_block_hash_index_test.cc
filter_block.h
filter_block_reader_common.cc
filter_block_reader_common.h
filter_policy.cc Make RibbonFilterPolicy::bloom_before_level mutable (SetOptions()) (#11838) 2023-09-15 15:46:10 -07:00
filter_policy_internal.h Make RibbonFilterPolicy::bloom_before_level mutable (SetOptions()) (#11838) 2023-09-15 15:46:10 -07:00
flush_block_policy.cc
flush_block_policy_impl.h
full_filter_block.cc
full_filter_block.h
full_filter_block_test.cc
hash_index_reader.cc
hash_index_reader.h
index_builder.cc
index_builder.h
index_reader_common.cc format_version=6 and context-aware block checksums (#9058) 2023-07-30 16:40:01 -07:00
index_reader_common.h
mock_block_based_table.h
parsed_full_filter_block.cc
parsed_full_filter_block.h
partitioned_filter_block.cc Implement trimming of readhead size when upper bound is specified (#11684) 2023-08-18 15:52:04 -07:00
partitioned_filter_block.h
partitioned_filter_block_test.cc
partitioned_index_iterator.cc Group rocksdb.sst.read.micros stat by different user read IOActivity + misc (#11444) 2023-08-08 17:26:50 -07:00
partitioned_index_iterator.h
partitioned_index_reader.cc Implement trimming of readhead size when upper bound is specified (#11684) 2023-08-18 15:52:04 -07:00
partitioned_index_reader.h
reader_common.cc format_version=6 and context-aware block checksums (#9058) 2023-07-30 16:40:01 -07:00
reader_common.h format_version=6 and context-aware block checksums (#9058) 2023-07-30 16:40:01 -07:00
uncompression_dict_reader.cc
uncompression_dict_reader.h