From b45738622a44bba3a4443c260a7c9513c30ad441 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Tue, 4 Apr 2023 16:53:14 -0700 Subject: [PATCH] Use user-provided ReadOptions for metadata block reads more often (#11208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: This is mostly taken from https://github.com/facebook/rocksdb/issues/10427 with my own comments addressed. This PR plumbs the user’s `ReadOptions` down to `GetOrReadIndexBlock()`, `GetOrReadFilterBlock()`, and `GetFilterPartitionBlock()`. Now those functions no longer have to make up a `ReadOptions` with incomplete information. I also let `PartitionIndexReader::NewIterator()` pass through its caller's `ReadOptions::verify_checksums`, which was inexplicably dropped previously. Fixes https://github.com/facebook/rocksdb/issues/10463 Pull Request resolved: https://github.com/facebook/rocksdb/pull/11208 Test Plan: Functional: - Measured `-verify_checksum=false` applies to metadata blocks read outside of table open - setup command: `TEST_TMPDIR=/tmp/100M-DB/ ./db_bench -benchmarks=filluniquerandom,waitforcompaction -write_buffer_size=1048576 -target_file_size_base=1048576 -max_bytes_for_level_base=4194304 -compression_type=none -num=1638400 -key_size=8 -value_size=56` - run command: `TEST_TMPDIR=/tmp/100M-DB/ ./db_bench -benchmarks=readrandom -use_existing_db=true -write_buffer_size=1048576 -target_file_size_base=1048576 -max_bytes_for_level_base=4194304 -compression_type=none -num=1638400 -key_size=8 -value_size=56 -duration=10 -threads=32 -cache_size=131072 -statistics=true -verify_checksum=false -open_files=20 -cache_index_and_filter_blocks=true` - before: `rocksdb.block.checksum.compute.count COUNT : 384353` - after: `rocksdb.block.checksum.compute.count COUNT : 22` Performance: - Setup command (tmpfs, 128MB logical data size, cache indexes/filters without pinning so index/filter lookups go through table reader): `TEST_TMPDIR=/dev/shm/128M-DB/ ./db_bench -benchmarks=filluniquerandom,waitforcompaction -write_buffer_size=131072 -target_file_size_base=131072 -max_bytes_for_level_base=524288 -compression_type=none -num=4194304 -key_size=8 -value_size=24 -bloom_bits=8 -whole_key_filtering=1` - Measured point lookup performance. Database is fully cached to emphasize any new callstack overheads - Command: `TEST_TMPDIR=/dev/shm/128M-DB/ ./db_bench -benchmarks=readrandom[-W1][-X20] -use_existing_db=true -cache_index_and_filter_blocks=true -disable_auto_compactions=true -num=4194304 -key_size=8 -value_size=24 -bloom_bits=8 -whole_key_filtering=1 -duration=10 -cache_size=1048576000` - Before: `readrandom [AVG 20 runs] : 274848 (± 3717) ops/sec; 8.4 (± 0.1) MB/sec` - After: `readrandom [AVG 20 runs] : 277904 (± 4474) ops/sec; 8.5 (± 0.1) MB/sec` Reviewed By: hx235 Differential Revision: D43145366 Pulled By: ajkr fbshipit-source-id: 75ec062ece86a82cd788783de9de2c72df57f994 --- HISTORY.md | 1 + .../block_based/binary_search_index_reader.cc | 5 +- table/block_based/block_based_table_reader.cc | 26 ++++---- table/block_based/block_based_table_reader.h | 4 +- .../block_based_table_reader_sync_and_async.h | 2 +- table/block_based/filter_block.h | 15 +++-- .../block_based/filter_block_reader_common.cc | 14 ++--- .../block_based/filter_block_reader_common.h | 4 +- table/block_based/full_filter_block.cc | 41 ++++++------ table/block_based/full_filter_block.h | 16 ++--- table/block_based/full_filter_block_test.cc | 48 +++++--------- table/block_based/hash_index_reader.cc | 5 +- table/block_based/index_reader_common.cc | 9 ++- table/block_based/index_reader_common.h | 6 +- table/block_based/partitioned_filter_block.cc | 62 ++++++++----------- table/block_based/partitioned_filter_block.h | 21 +++---- .../partitioned_filter_block_test.cc | 16 +++-- table/block_based/partitioned_index_reader.cc | 11 ++-- util/filter_bench.cc | 2 +- 19 files changed, 133 insertions(+), 175 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 5bac016872..e2baea202b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,6 +7,7 @@ ### Behavior changes * Changed default block cache size from an 8MB to 32MB LRUCache, which increases the default number of cache shards from 16 to 64. This change is intended to minimize cache mutex contention under stress conditions. See https://github.com/facebook/rocksdb/wiki/Block-Cache for more information. * For level compaction with `level_compaction_dynamic_level_bytes=true`, RocksDB now trivially moves levels down to fill LSM starting from bottommost level during DB open. See more in comments for option `level_compaction_dynamic_level_bytes`. +* User-provided `ReadOptions` take effect for more reads of non-`CacheEntryRole::kDataBlock` blocks. ### New Features * Add experimental `PerfContext` counters `iter_{next|prev|seek}_count` for db iterator, each counting the times of corresponding API being called. diff --git a/table/block_based/binary_search_index_reader.cc b/table/block_based/binary_search_index_reader.cc index 21787cc1aa..2cf9a55318 100644 --- a/table/block_based/binary_search_index_reader.cc +++ b/table/block_based/binary_search_index_reader.cc @@ -46,9 +46,8 @@ InternalIteratorBase* BinarySearchIndexReader::NewIterator( const BlockBasedTable::Rep* rep = table()->get_rep(); const bool no_io = (read_options.read_tier == kBlockCacheTier); CachableEntry index_block; - const Status s = - GetOrReadIndexBlock(no_io, read_options.rate_limiter_priority, - get_context, lookup_context, &index_block); + const Status s = GetOrReadIndexBlock(no_io, get_context, lookup_context, + &index_block, read_options); if (!s.ok()) { if (iter != nullptr) { iter->Invalidate(s); diff --git a/table/block_based/block_based_table_reader.cc b/table/block_based/block_based_table_reader.cc index 6b0e2f1584..55253f11e8 100644 --- a/table/block_based/block_based_table_reader.cc +++ b/table/block_based/block_based_table_reader.cc @@ -1781,7 +1781,7 @@ bool BlockBasedTable::PrefixRangeMayMatch( read_options.iterate_upper_bound, user_key_without_ts, prefix_extractor, rep_->internal_comparator.user_comparator(), const_ikey_ptr, &filter_checked, need_upper_bound_check, no_io, lookup_context, - read_options.rate_limiter_priority); + read_options); } if (filter_checked) { @@ -1855,7 +1855,7 @@ bool BlockBasedTable::FullFilterKeyMayMatch( FilterBlockReader* filter, const Slice& internal_key, const bool no_io, const SliceTransform* prefix_extractor, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) const { + const ReadOptions& read_options) const { if (filter == nullptr) { return true; } @@ -1865,15 +1865,13 @@ bool BlockBasedTable::FullFilterKeyMayMatch( size_t ts_sz = rep_->internal_comparator.user_comparator()->timestamp_size(); Slice user_key_without_ts = StripTimestampFromUserKey(user_key, ts_sz); if (rep_->whole_key_filtering) { - may_match = - filter->KeyMayMatch(user_key_without_ts, no_io, const_ikey_ptr, - get_context, lookup_context, rate_limiter_priority); + may_match = filter->KeyMayMatch(user_key_without_ts, no_io, const_ikey_ptr, + get_context, lookup_context, read_options); } else if (!PrefixExtractorChanged(prefix_extractor) && prefix_extractor->InDomain(user_key_without_ts) && !filter->PrefixMayMatch( prefix_extractor->Transform(user_key_without_ts), no_io, - const_ikey_ptr, get_context, lookup_context, - rate_limiter_priority)) { + const_ikey_ptr, get_context, lookup_context, read_options)) { // FIXME ^^^: there should be no reason for Get() to depend on current // prefix_extractor at all. It should always use table_prefix_extractor. may_match = false; @@ -1889,14 +1887,14 @@ void BlockBasedTable::FullFilterKeysMayMatch( FilterBlockReader* filter, MultiGetRange* range, const bool no_io, const SliceTransform* prefix_extractor, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) const { + const ReadOptions& read_options) const { if (filter == nullptr) { return; } uint64_t before_keys = range->KeysLeft(); assert(before_keys > 0); // Caller should ensure if (rep_->whole_key_filtering) { - filter->KeysMayMatch(range, no_io, lookup_context, rate_limiter_priority); + filter->KeysMayMatch(range, no_io, lookup_context, read_options); uint64_t after_keys = range->KeysLeft(); if (after_keys) { RecordTick(rep_->ioptions.stats, BLOOM_FILTER_FULL_POSITIVE, after_keys); @@ -1913,7 +1911,7 @@ void BlockBasedTable::FullFilterKeysMayMatch( // FIXME ^^^: there should be no reason for MultiGet() to depend on current // prefix_extractor at all. It should always use table_prefix_extractor. filter->PrefixesMayMatch(range, prefix_extractor, false, lookup_context, - rate_limiter_priority); + read_options); RecordTick(rep_->ioptions.stats, BLOOM_FILTER_PREFIX_CHECKED, before_keys); uint64_t after_keys = range->KeysLeft(); uint64_t filtered_keys = before_keys - after_keys; @@ -2010,9 +2008,9 @@ Status BlockBasedTable::Get(const ReadOptions& read_options, const Slice& key, read_options.snapshot != nullptr; } TEST_SYNC_POINT("BlockBasedTable::Get:BeforeFilterMatch"); - const bool may_match = FullFilterKeyMayMatch( - filter, key, no_io, prefix_extractor, get_context, &lookup_context, - read_options.rate_limiter_priority); + const bool may_match = + FullFilterKeyMayMatch(filter, key, no_io, prefix_extractor, get_context, + &lookup_context, read_options); TEST_SYNC_POINT("BlockBasedTable::Get:AfterFilterMatch"); if (!may_match) { RecordTick(rep_->ioptions.stats, BLOOM_FILTER_USEFUL); @@ -2182,7 +2180,7 @@ Status BlockBasedTable::MultiGetFilter(const ReadOptions& read_options, TableReaderCaller::kUserMultiGet, tracing_mget_id, /*_get_from_user_specified_snapshot=*/read_options.snapshot != nullptr}; FullFilterKeysMayMatch(filter, mget_range, no_io, prefix_extractor, - &lookup_context, read_options.rate_limiter_priority); + &lookup_context, read_options); return Status::OK(); } diff --git a/table/block_based/block_based_table_reader.h b/table/block_based/block_based_table_reader.h index d50ee0a2e5..ec9473b006 100644 --- a/table/block_based/block_based_table_reader.h +++ b/table/block_based/block_based_table_reader.h @@ -429,13 +429,13 @@ class BlockBasedTable : public TableReader { const SliceTransform* prefix_extractor, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) const; + const ReadOptions& read_options) const; void FullFilterKeysMayMatch(FilterBlockReader* filter, MultiGetRange* range, const bool no_io, const SliceTransform* prefix_extractor, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) const; + const ReadOptions& read_options) const; // If force_direct_prefetch is true, always prefetching to RocksDB // buffer, rather than calling RandomAccessFile::Prefetch(). diff --git a/table/block_based/block_based_table_reader_sync_and_async.h b/table/block_based/block_based_table_reader_sync_and_async.h index 65d29e8318..c5e1e44fe8 100644 --- a/table/block_based/block_based_table_reader_sync_and_async.h +++ b/table/block_based/block_based_table_reader_sync_and_async.h @@ -335,7 +335,7 @@ DEFINE_SYNC_AND_ASYNC(void, BlockBasedTable::MultiGet) TableReaderCaller::kUserMultiGet, tracing_mget_id, /*_get_from_user_specified_snapshot=*/read_options.snapshot != nullptr}; FullFilterKeysMayMatch(filter, &sst_file_range, no_io, prefix_extractor, - &lookup_context, read_options.rate_limiter_priority); + &lookup_context, read_options); if (!sst_file_range.empty()) { IndexBlockIter iiter_on_stack; diff --git a/table/block_based/filter_block.h b/table/block_based/filter_block.h index e1e2069906..957413d106 100644 --- a/table/block_based/filter_block.h +++ b/table/block_based/filter_block.h @@ -113,17 +113,17 @@ class FilterBlockReader { const Slice* const const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) = 0; + const ReadOptions& read_options) = 0; virtual void KeysMayMatch(MultiGetRange* range, const bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { + const ReadOptions& read_options) { for (auto iter = range->begin(); iter != range->end(); ++iter) { const Slice ukey_without_ts = iter->ukey_without_ts; const Slice ikey = iter->ikey; GetContext* const get_context = iter->get_context; if (!KeyMayMatch(ukey_without_ts, no_io, &ikey, get_context, - lookup_context, rate_limiter_priority)) { + lookup_context, read_options)) { range->SkipKey(iter); } } @@ -136,21 +136,20 @@ class FilterBlockReader { const Slice* const const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) = 0; + const ReadOptions& read_options) = 0; virtual void PrefixesMayMatch(MultiGetRange* range, const SliceTransform* prefix_extractor, const bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { + const ReadOptions& read_options) { for (auto iter = range->begin(); iter != range->end(); ++iter) { const Slice ukey_without_ts = iter->ukey_without_ts; const Slice ikey = iter->ikey; GetContext* const get_context = iter->get_context; if (prefix_extractor->InDomain(ukey_without_ts) && !PrefixMayMatch(prefix_extractor->Transform(ukey_without_ts), no_io, - &ikey, get_context, lookup_context, - rate_limiter_priority)) { + &ikey, get_context, lookup_context, read_options)) { range->SkipKey(iter); } } @@ -176,7 +175,7 @@ class FilterBlockReader { bool* filter_checked, bool need_upper_bound_check, bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) = 0; + const ReadOptions& read_options) = 0; }; } // namespace ROCKSDB_NAMESPACE diff --git a/table/block_based/filter_block_reader_common.cc b/table/block_based/filter_block_reader_common.cc index 12b0eeb464..32f800db79 100644 --- a/table/block_based/filter_block_reader_common.cc +++ b/table/block_based/filter_block_reader_common.cc @@ -70,7 +70,7 @@ Status FilterBlockReaderCommon::GetOrReadFilterBlock( bool no_io, GetContext* get_context, BlockCacheLookupContext* lookup_context, CachableEntry* filter_block, - Env::IOPriority rate_limiter_priority) const { + const ReadOptions& read_options) const { assert(filter_block); if (!filter_block_.IsEmpty()) { @@ -78,13 +78,12 @@ Status FilterBlockReaderCommon::GetOrReadFilterBlock( return Status::OK(); } - ReadOptions read_options; - read_options.rate_limiter_priority = rate_limiter_priority; + ReadOptions ro = read_options; if (no_io) { - read_options.read_tier = kBlockCacheTier; + ro.read_tier = kBlockCacheTier; } - return ReadFilterBlock(table_, nullptr /* prefetch_buffer */, read_options, + return ReadFilterBlock(table_, nullptr /* prefetch_buffer */, ro, cache_filter_blocks(), get_context, lookup_context, filter_block); } @@ -104,8 +103,7 @@ bool FilterBlockReaderCommon::RangeMayExist( const SliceTransform* prefix_extractor, const Comparator* comparator, const Slice* const const_ikey_ptr, bool* filter_checked, bool need_upper_bound_check, bool no_io, - BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { + BlockCacheLookupContext* lookup_context, const ReadOptions& read_options) { if (!prefix_extractor || !prefix_extractor->InDomain(user_key_without_ts)) { *filter_checked = false; return true; @@ -119,7 +117,7 @@ bool FilterBlockReaderCommon::RangeMayExist( *filter_checked = true; return PrefixMayMatch(prefix, no_io, const_ikey_ptr, /* get_context */ nullptr, lookup_context, - rate_limiter_priority); + read_options); } } diff --git a/table/block_based/filter_block_reader_common.h b/table/block_based/filter_block_reader_common.h index 5c2fbdcea7..62335b30be 100644 --- a/table/block_based/filter_block_reader_common.h +++ b/table/block_based/filter_block_reader_common.h @@ -40,7 +40,7 @@ class FilterBlockReaderCommon : public FilterBlockReader { const Slice* const const_ikey_ptr, bool* filter_checked, bool need_upper_bound_check, bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) override; + const ReadOptions& read_options) override; protected: static Status ReadFilterBlock(const BlockBasedTable* table, @@ -58,7 +58,7 @@ class FilterBlockReaderCommon : public FilterBlockReader { Status GetOrReadFilterBlock(bool no_io, GetContext* get_context, BlockCacheLookupContext* lookup_context, CachableEntry* filter_block, - Env::IOPriority rate_limiter_priority) const; + const ReadOptions& read_options) const; size_t ApproximateFilterBlockMemoryUsage() const; diff --git a/table/block_based/full_filter_block.cc b/table/block_based/full_filter_block.cc index a7680e494d..60ff7c44f3 100644 --- a/table/block_based/full_filter_block.cc +++ b/table/block_based/full_filter_block.cc @@ -127,12 +127,11 @@ bool FullFilterBlockReader::KeyMayMatch(const Slice& key, const bool no_io, const Slice* const /*const_ikey_ptr*/, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { + const ReadOptions& read_options) { if (!whole_key_filtering()) { return true; } - return MayMatch(key, no_io, get_context, lookup_context, - rate_limiter_priority); + return MayMatch(key, no_io, get_context, lookup_context, read_options); } std::unique_ptr FullFilterBlockReader::Create( @@ -165,20 +164,18 @@ std::unique_ptr FullFilterBlockReader::Create( bool FullFilterBlockReader::PrefixMayMatch( const Slice& prefix, const bool no_io, const Slice* const /*const_ikey_ptr*/, GetContext* get_context, - BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { - return MayMatch(prefix, no_io, get_context, lookup_context, - rate_limiter_priority); + BlockCacheLookupContext* lookup_context, const ReadOptions& read_options) { + return MayMatch(prefix, no_io, get_context, lookup_context, read_options); } -bool FullFilterBlockReader::MayMatch( - const Slice& entry, bool no_io, GetContext* get_context, - BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) const { +bool FullFilterBlockReader::MayMatch(const Slice& entry, bool no_io, + GetContext* get_context, + BlockCacheLookupContext* lookup_context, + const ReadOptions& read_options) const { CachableEntry filter_block; const Status s = GetOrReadFilterBlock(no_io, get_context, lookup_context, - &filter_block, rate_limiter_priority); + &filter_block, read_options); if (!s.ok()) { IGNORE_STATUS_IF_ERROR(s); return true; @@ -203,33 +200,31 @@ bool FullFilterBlockReader::MayMatch( void FullFilterBlockReader::KeysMayMatch( MultiGetRange* range, const bool no_io, - BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { + BlockCacheLookupContext* lookup_context, const ReadOptions& read_options) { if (!whole_key_filtering()) { // Simply return. Don't skip any key - consider all keys as likely to be // present return; } - MayMatch(range, no_io, nullptr, lookup_context, rate_limiter_priority); + MayMatch(range, no_io, nullptr, lookup_context, read_options); } void FullFilterBlockReader::PrefixesMayMatch( MultiGetRange* range, const SliceTransform* prefix_extractor, const bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { - MayMatch(range, no_io, prefix_extractor, lookup_context, - rate_limiter_priority); + const ReadOptions& read_options) { + MayMatch(range, no_io, prefix_extractor, lookup_context, read_options); } -void FullFilterBlockReader::MayMatch( - MultiGetRange* range, bool no_io, const SliceTransform* prefix_extractor, - BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) const { +void FullFilterBlockReader::MayMatch(MultiGetRange* range, bool no_io, + const SliceTransform* prefix_extractor, + BlockCacheLookupContext* lookup_context, + const ReadOptions& read_options) const { CachableEntry filter_block; const Status s = GetOrReadFilterBlock(no_io, range->begin()->get_context, lookup_context, - &filter_block, rate_limiter_priority); + &filter_block, read_options); if (!s.ok()) { IGNORE_STATUS_IF_ERROR(s); return; diff --git a/table/block_based/full_filter_block.h b/table/block_based/full_filter_block.h index cd1771a388..7b0890d10c 100644 --- a/table/block_based/full_filter_block.h +++ b/table/block_based/full_filter_block.h @@ -108,40 +108,40 @@ class FullFilterBlockReader bool KeyMayMatch(const Slice& key, const bool no_io, const Slice* const const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) override; + const ReadOptions& read_options) override; bool PrefixMayMatch(const Slice& prefix, const bool no_io, const Slice* const const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) override; + const ReadOptions& read_options) override; void KeysMayMatch(MultiGetRange* range, const bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) override; + const ReadOptions& read_options) override; // Used in partitioned filter code void KeysMayMatch2(MultiGetRange* range, const SliceTransform* /*prefix_extractor*/, const bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { - KeysMayMatch(range, no_io, lookup_context, rate_limiter_priority); + const ReadOptions& read_options) { + KeysMayMatch(range, no_io, lookup_context, read_options); } void PrefixesMayMatch(MultiGetRange* range, const SliceTransform* prefix_extractor, const bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) override; + const ReadOptions& read_options) override; size_t ApproximateMemoryUsage() const override; private: bool MayMatch(const Slice& entry, bool no_io, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) const; + const ReadOptions& read_options) const; void MayMatch(MultiGetRange* range, bool no_io, const SliceTransform* prefix_extractor, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) const; + const ReadOptions& read_options) const; }; } // namespace ROCKSDB_NAMESPACE diff --git a/table/block_based/full_filter_block_test.cc b/table/block_based/full_filter_block_test.cc index bd98638e5b..0268b7b271 100644 --- a/table/block_based/full_filter_block_test.cc +++ b/table/block_based/full_filter_block_test.cc @@ -117,7 +117,7 @@ TEST_F(PluginFullFilterBlockTest, PluginEmptyBuilder) { ASSERT_TRUE(reader.KeyMayMatch("foo", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, Env::IO_TOTAL)); + /*lookup_context=*/nullptr, ReadOptions())); } TEST_F(PluginFullFilterBlockTest, PluginSingleChunk) { @@ -135,42 +135,34 @@ TEST_F(PluginFullFilterBlockTest, PluginSingleChunk) { nullptr /* cache */, nullptr /* cache_handle */, true /* own_value */); FullFilterBlockReader reader(table_.get(), std::move(block)); - Env::IOPriority rate_limiter_priority = Env::IO_TOTAL; ASSERT_TRUE(reader.KeyMayMatch("foo", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(reader.KeyMayMatch("bar", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(reader.KeyMayMatch("box", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(reader.KeyMayMatch("hello", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(reader.KeyMayMatch("foo", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(!reader.KeyMayMatch("missing", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(!reader.KeyMayMatch("other", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); } class FullFilterBlockTest : public mock::MockBlockBasedTableTester, @@ -195,7 +187,7 @@ TEST_F(FullFilterBlockTest, EmptyBuilder) { ASSERT_TRUE(reader.KeyMayMatch("foo", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, Env::IO_TOTAL)); + /*lookup_context=*/nullptr, ReadOptions())); } class CountUniqueFilterBitsBuilderWrapper : public FilterBitsBuilder { @@ -292,42 +284,34 @@ TEST_F(FullFilterBlockTest, SingleChunk) { nullptr /* cache */, nullptr /* cache_handle */, true /* own_value */); FullFilterBlockReader reader(table_.get(), std::move(block)); - Env::IOPriority rate_limiter_priority = Env::IO_TOTAL; ASSERT_TRUE(reader.KeyMayMatch("foo", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(reader.KeyMayMatch("bar", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(reader.KeyMayMatch("box", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(reader.KeyMayMatch("hello", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(reader.KeyMayMatch("foo", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(!reader.KeyMayMatch("missing", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); ASSERT_TRUE(!reader.KeyMayMatch("other", /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, - rate_limiter_priority)); + /*lookup_context=*/nullptr, ReadOptions())); } } // namespace ROCKSDB_NAMESPACE diff --git a/table/block_based/hash_index_reader.cc b/table/block_based/hash_index_reader.cc index bcaba17a25..83232dc7e7 100644 --- a/table/block_based/hash_index_reader.cc +++ b/table/block_based/hash_index_reader.cc @@ -116,9 +116,8 @@ InternalIteratorBase* HashIndexReader::NewIterator( const BlockBasedTable::Rep* rep = table()->get_rep(); const bool no_io = (read_options.read_tier == kBlockCacheTier); CachableEntry index_block; - const Status s = - GetOrReadIndexBlock(no_io, read_options.rate_limiter_priority, - get_context, lookup_context, &index_block); + const Status s = GetOrReadIndexBlock(no_io, get_context, lookup_context, + &index_block, read_options); if (!s.ok()) { if (iter != nullptr) { iter->Invalidate(s); diff --git a/table/block_based/index_reader_common.cc b/table/block_based/index_reader_common.cc index 576d0b1503..828200299d 100644 --- a/table/block_based/index_reader_common.cc +++ b/table/block_based/index_reader_common.cc @@ -35,9 +35,9 @@ Status BlockBasedTable::IndexReaderCommon::ReadIndexBlock( } Status BlockBasedTable::IndexReaderCommon::GetOrReadIndexBlock( - bool no_io, Env::IOPriority rate_limiter_priority, GetContext* get_context, - BlockCacheLookupContext* lookup_context, - CachableEntry* index_block) const { + bool no_io, GetContext* get_context, + BlockCacheLookupContext* lookup_context, CachableEntry* index_block, + const ReadOptions& ro) const { assert(index_block != nullptr); if (!index_block_.IsEmpty()) { @@ -45,8 +45,7 @@ Status BlockBasedTable::IndexReaderCommon::GetOrReadIndexBlock( return Status::OK(); } - ReadOptions read_options; - read_options.rate_limiter_priority = rate_limiter_priority; + ReadOptions read_options = ro; if (no_io) { read_options.read_tier = kBlockCacheTier; } diff --git a/table/block_based/index_reader_common.h b/table/block_based/index_reader_common.h index 5627b0eeb3..d3827fc6bc 100644 --- a/table/block_based/index_reader_common.h +++ b/table/block_based/index_reader_common.h @@ -65,10 +65,10 @@ class BlockBasedTable::IndexReaderCommon : public BlockBasedTable::IndexReader { return table_->get_rep()->table_options.cache_index_and_filter_blocks; } - Status GetOrReadIndexBlock(bool no_io, Env::IOPriority rate_limiter_priority, - GetContext* get_context, + Status GetOrReadIndexBlock(bool no_io, GetContext* get_context, BlockCacheLookupContext* lookup_context, - CachableEntry* index_block) const; + CachableEntry* index_block, + const ReadOptions& read_options) const; size_t ApproximateIndexBlockMemoryUsage() const { assert(!index_block_.GetOwnValue() || index_block_.GetValue() != nullptr); diff --git a/table/block_based/partitioned_filter_block.cc b/table/block_based/partitioned_filter_block.cc index 3429a72567..569b58fef0 100644 --- a/table/block_based/partitioned_filter_block.cc +++ b/table/block_based/partitioned_filter_block.cc @@ -220,45 +220,43 @@ std::unique_ptr PartitionedFilterBlockReader::Create( bool PartitionedFilterBlockReader::KeyMayMatch( const Slice& key, const bool no_io, const Slice* const const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { + const ReadOptions& read_options) { assert(const_ikey_ptr != nullptr); if (!whole_key_filtering()) { return true; } return MayMatch(key, no_io, const_ikey_ptr, get_context, lookup_context, - rate_limiter_priority, &FullFilterBlockReader::KeyMayMatch); + read_options, &FullFilterBlockReader::KeyMayMatch); } void PartitionedFilterBlockReader::KeysMayMatch( MultiGetRange* range, const bool no_io, - BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { + BlockCacheLookupContext* lookup_context, const ReadOptions& read_options) { if (!whole_key_filtering()) { return; // Any/all may match } - MayMatch(range, nullptr, no_io, lookup_context, rate_limiter_priority, + MayMatch(range, nullptr, no_io, lookup_context, read_options, &FullFilterBlockReader::KeysMayMatch2); } bool PartitionedFilterBlockReader::PrefixMayMatch( const Slice& prefix, const bool no_io, const Slice* const const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { + const ReadOptions& read_options) { assert(const_ikey_ptr != nullptr); return MayMatch(prefix, no_io, const_ikey_ptr, get_context, lookup_context, - rate_limiter_priority, - &FullFilterBlockReader::PrefixMayMatch); + read_options, &FullFilterBlockReader::PrefixMayMatch); } void PartitionedFilterBlockReader::PrefixesMayMatch( MultiGetRange* range, const SliceTransform* prefix_extractor, const bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) { + const ReadOptions& read_options) { assert(prefix_extractor); - MayMatch(range, prefix_extractor, no_io, lookup_context, - rate_limiter_priority, &FullFilterBlockReader::PrefixesMayMatch); + MayMatch(range, prefix_extractor, no_io, lookup_context, read_options, + &FullFilterBlockReader::PrefixesMayMatch); } BlockHandle PartitionedFilterBlockReader::GetFilterPartitionHandle( @@ -290,8 +288,7 @@ BlockHandle PartitionedFilterBlockReader::GetFilterPartitionHandle( Status PartitionedFilterBlockReader::GetFilterPartitionBlock( FilePrefetchBuffer* prefetch_buffer, const BlockHandle& fltr_blk_handle, bool no_io, GetContext* get_context, - BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority, + BlockCacheLookupContext* lookup_context, const ReadOptions& _read_options, CachableEntry* filter_block) const { assert(table()); assert(filter_block); @@ -307,8 +304,7 @@ Status PartitionedFilterBlockReader::GetFilterPartitionBlock( } } - ReadOptions read_options; - read_options.rate_limiter_priority = rate_limiter_priority; + ReadOptions read_options = _read_options; if (no_io) { read_options.read_tier = kBlockCacheTier; } @@ -326,11 +322,10 @@ Status PartitionedFilterBlockReader::GetFilterPartitionBlock( bool PartitionedFilterBlockReader::MayMatch( const Slice& slice, bool no_io, const Slice* const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority, - FilterFunction filter_function) const { + const ReadOptions& read_options, FilterFunction filter_function) const { CachableEntry filter_block; Status s = GetOrReadFilterBlock(no_io, get_context, lookup_context, - &filter_block, rate_limiter_priority); + &filter_block, read_options); if (UNLIKELY(!s.ok())) { IGNORE_STATUS_IF_ERROR(s); return true; @@ -347,8 +342,8 @@ bool PartitionedFilterBlockReader::MayMatch( CachableEntry filter_partition_block; s = GetFilterPartitionBlock(nullptr /* prefetch_buffer */, filter_handle, - no_io, get_context, lookup_context, - rate_limiter_priority, &filter_partition_block); + no_io, get_context, lookup_context, read_options, + &filter_partition_block); if (UNLIKELY(!s.ok())) { IGNORE_STATUS_IF_ERROR(s); return true; @@ -356,20 +351,17 @@ bool PartitionedFilterBlockReader::MayMatch( FullFilterBlockReader filter_partition(table(), std::move(filter_partition_block)); - return (filter_partition.*filter_function)(slice, no_io, const_ikey_ptr, - get_context, lookup_context, - rate_limiter_priority); + return (filter_partition.*filter_function)( + slice, no_io, const_ikey_ptr, get_context, lookup_context, read_options); } void PartitionedFilterBlockReader::MayMatch( MultiGetRange* range, const SliceTransform* prefix_extractor, bool no_io, - BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority, + BlockCacheLookupContext* lookup_context, const ReadOptions& read_options, FilterManyFunction filter_function) const { CachableEntry filter_block; - Status s = - GetOrReadFilterBlock(no_io, range->begin()->get_context, lookup_context, - &filter_block, rate_limiter_priority); + Status s = GetOrReadFilterBlock(no_io, range->begin()->get_context, + lookup_context, &filter_block, read_options); if (UNLIKELY(!s.ok())) { IGNORE_STATUS_IF_ERROR(s); return; // Any/all may match @@ -393,7 +385,7 @@ void PartitionedFilterBlockReader::MayMatch( this_filter_handle != prev_filter_handle) { MultiGetRange subrange(*range, start_iter_same_handle, iter); MayMatchPartition(&subrange, prefix_extractor, prev_filter_handle, no_io, - lookup_context, rate_limiter_priority, filter_function); + lookup_context, read_options, filter_function); range->AddSkipsFrom(subrange); start_iter_same_handle = iter; } @@ -409,7 +401,7 @@ void PartitionedFilterBlockReader::MayMatch( if (!prev_filter_handle.IsNull()) { MultiGetRange subrange(*range, start_iter_same_handle, range->end()); MayMatchPartition(&subrange, prefix_extractor, prev_filter_handle, no_io, - lookup_context, rate_limiter_priority, filter_function); + lookup_context, read_options, filter_function); range->AddSkipsFrom(subrange); } } @@ -417,13 +409,12 @@ void PartitionedFilterBlockReader::MayMatch( void PartitionedFilterBlockReader::MayMatchPartition( MultiGetRange* range, const SliceTransform* prefix_extractor, BlockHandle filter_handle, bool no_io, - BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority, + BlockCacheLookupContext* lookup_context, const ReadOptions& read_options, FilterManyFunction filter_function) const { CachableEntry filter_partition_block; Status s = GetFilterPartitionBlock( nullptr /* prefetch_buffer */, filter_handle, no_io, - range->begin()->get_context, lookup_context, rate_limiter_priority, + range->begin()->get_context, lookup_context, read_options, &filter_partition_block); if (UNLIKELY(!s.ok())) { IGNORE_STATUS_IF_ERROR(s); @@ -433,7 +424,7 @@ void PartitionedFilterBlockReader::MayMatchPartition( FullFilterBlockReader filter_partition(table(), std::move(filter_partition_block)); (filter_partition.*filter_function)(range, prefix_extractor, no_io, - lookup_context, rate_limiter_priority); + lookup_context, read_options); } size_t PartitionedFilterBlockReader::ApproximateMemoryUsage() const { @@ -460,8 +451,7 @@ Status PartitionedFilterBlockReader::CacheDependencies(const ReadOptions& ro, CachableEntry filter_block; Status s = GetOrReadFilterBlock(false /* no_io */, nullptr /* get_context */, - &lookup_context, &filter_block, - ro.rate_limiter_priority); + &lookup_context, &filter_block, ro); if (!s.ok()) { ROCKS_LOG_ERROR(rep->ioptions.logger, "Error retrieving top-level filter block while trying to " diff --git a/table/block_based/partitioned_filter_block.h b/table/block_based/partitioned_filter_block.h index e810c01eeb..9f7a7be7b9 100644 --- a/table/block_based/partitioned_filter_block.h +++ b/table/block_based/partitioned_filter_block.h @@ -115,21 +115,21 @@ class PartitionedFilterBlockReader bool KeyMayMatch(const Slice& key, const bool no_io, const Slice* const const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) override; + const ReadOptions& read_options) override; void KeysMayMatch(MultiGetRange* range, const bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) override; + const ReadOptions& read_options) override; bool PrefixMayMatch(const Slice& prefix, const bool no_io, const Slice* const const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) override; + const ReadOptions& read_options) override; void PrefixesMayMatch(MultiGetRange* range, const SliceTransform* prefix_extractor, const bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority) override; + const ReadOptions& read_options) override; size_t ApproximateMemoryUsage() const override; @@ -140,32 +140,31 @@ class PartitionedFilterBlockReader Status GetFilterPartitionBlock( FilePrefetchBuffer* prefetch_buffer, const BlockHandle& handle, bool no_io, GetContext* get_context, - BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority, + BlockCacheLookupContext* lookup_context, const ReadOptions& read_options, CachableEntry* filter_block) const; using FilterFunction = bool (FullFilterBlockReader::*)( const Slice& slice, const bool no_io, const Slice* const const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority); + const ReadOptions& read_options); bool MayMatch(const Slice& slice, bool no_io, const Slice* const_ikey_ptr, GetContext* get_context, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority, + const ReadOptions& read_options, FilterFunction filter_function) const; using FilterManyFunction = void (FullFilterBlockReader::*)( MultiGetRange* range, const SliceTransform* prefix_extractor, const bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority); + const ReadOptions& read_options); void MayMatch(MultiGetRange* range, const SliceTransform* prefix_extractor, bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority, + const ReadOptions& read_options, FilterManyFunction filter_function) const; void MayMatchPartition(MultiGetRange* range, const SliceTransform* prefix_extractor, BlockHandle filter_handle, bool no_io, BlockCacheLookupContext* lookup_context, - Env::IOPriority rate_limiter_priority, + const ReadOptions& read_options, FilterManyFunction filter_function) const; Status CacheDependencies(const ReadOptions& ro, bool pin) override; diff --git a/table/block_based/partitioned_filter_block_test.cc b/table/block_based/partitioned_filter_block_test.cc index 59445c45e0..9302728279 100644 --- a/table/block_based/partitioned_filter_block_test.cc +++ b/table/block_based/partitioned_filter_block_test.cc @@ -167,7 +167,6 @@ class PartitionedFilterBlockTest PartitionedIndexBuilder* pib, bool empty = false) { std::unique_ptr reader( NewReader(builder, pib)); - Env::IOPriority rate_limiter_priority = Env::IO_TOTAL; // Querying added keys const bool no_io = true; for (auto key : keys) { @@ -176,7 +175,7 @@ class PartitionedFilterBlockTest ASSERT_TRUE(reader->KeyMayMatch(key, !no_io, &ikey_slice, /*get_context=*/nullptr, /*lookup_context=*/nullptr, - rate_limiter_priority)); + ReadOptions())); } { // querying a key twice @@ -185,7 +184,7 @@ class PartitionedFilterBlockTest ASSERT_TRUE(reader->KeyMayMatch(keys[0], !no_io, &ikey_slice, /*get_context=*/nullptr, /*lookup_context=*/nullptr, - rate_limiter_priority)); + ReadOptions())); } // querying missing keys for (auto key : missing_keys) { @@ -195,13 +194,13 @@ class PartitionedFilterBlockTest ASSERT_TRUE(reader->KeyMayMatch(key, !no_io, &ikey_slice, /*get_context=*/nullptr, /*lookup_context=*/nullptr, - rate_limiter_priority)); + ReadOptions())); } else { // assuming a good hash function ASSERT_FALSE(reader->KeyMayMatch(key, !no_io, &ikey_slice, /*get_context=*/nullptr, /*lookup_context=*/nullptr, - rate_limiter_priority)); + ReadOptions())); } } } @@ -354,7 +353,7 @@ TEST_P(PartitionedFilterBlockTest, SamePrefixInMultipleBlocks) { /*no_io=*/false, &ikey_slice, /*get_context=*/nullptr, /*lookup_context=*/nullptr, - Env::IO_TOTAL)); + ReadOptions())); } // Non-existent keys but with the same prefix const std::string pnonkeys[4] = {"p-key9", "p-key11", "p-key21", "p-key31"}; @@ -365,7 +364,7 @@ TEST_P(PartitionedFilterBlockTest, SamePrefixInMultipleBlocks) { /*no_io=*/false, &ikey_slice, /*get_context=*/nullptr, /*lookup_context=*/nullptr, - Env::IO_TOTAL)); + ReadOptions())); } } @@ -396,7 +395,6 @@ TEST_P(PartitionedFilterBlockTest, PrefixInWrongPartitionBug) { CutABlock(pib.get(), pkeys[4]); std::unique_ptr reader( NewReader(builder.get(), pib.get())); - Env::IOPriority rate_limiter_priority = Env::IO_TOTAL; for (auto key : pkeys) { auto prefix = prefix_extractor->Transform(key); auto ikey = InternalKey(prefix, 0, ValueType::kTypeValue); @@ -405,7 +403,7 @@ TEST_P(PartitionedFilterBlockTest, PrefixInWrongPartitionBug) { /*no_io=*/false, &ikey_slice, /*get_context=*/nullptr, /*lookup_context=*/nullptr, - rate_limiter_priority)); + ReadOptions())); } } diff --git a/table/block_based/partitioned_index_reader.cc b/table/block_based/partitioned_index_reader.cc index 3fd8a66725..d901f9ca38 100644 --- a/table/block_based/partitioned_index_reader.cc +++ b/table/block_based/partitioned_index_reader.cc @@ -49,9 +49,8 @@ InternalIteratorBase* PartitionIndexReader::NewIterator( BlockCacheLookupContext* lookup_context) { const bool no_io = (read_options.read_tier == kBlockCacheTier); CachableEntry index_block; - const Status s = - GetOrReadIndexBlock(no_io, read_options.rate_limiter_priority, - get_context, lookup_context, &index_block); + const Status s = GetOrReadIndexBlock(no_io, get_context, lookup_context, + &index_block, read_options); if (!s.ok()) { if (iter != nullptr) { iter->Invalidate(s); @@ -85,6 +84,7 @@ InternalIteratorBase* PartitionIndexReader::NewIterator( ro.adaptive_readahead = read_options.adaptive_readahead; ro.async_io = read_options.async_io; ro.rate_limiter_priority = read_options.rate_limiter_priority; + ro.verify_checksums = read_options.verify_checksums; // We don't return pinned data from index blocks, so no need // to set `block_contents_pinned`. @@ -127,9 +127,8 @@ Status PartitionIndexReader::CacheDependencies(const ReadOptions& ro, CachableEntry index_block; { - Status s = GetOrReadIndexBlock(false /* no_io */, ro.rate_limiter_priority, - nullptr /* get_context */, &lookup_context, - &index_block); + Status s = GetOrReadIndexBlock(false /* no_io */, nullptr /* get_context */, + &lookup_context, &index_block, ro); if (!s.ok()) { return s; } diff --git a/util/filter_bench.cc b/util/filter_bench.cc index 13bd40300f..4e6dabf576 100644 --- a/util/filter_bench.cc +++ b/util/filter_bench.cc @@ -728,7 +728,7 @@ double FilterBench::RandomQueryTest(uint32_t inside_threshold, bool dry_run, batch_slices[i], /*no_io=*/false, /*const_ikey_ptr=*/nullptr, /*get_context=*/nullptr, - /*lookup_context=*/nullptr, Env::IO_TOTAL); + /*lookup_context=*/nullptr, ROCKSDB_NAMESPACE::ReadOptions()); } } else { if (dry_run) {