diff --git a/db/table_cache.cc b/db/table_cache.cc index 4dc56935fb..a1a03d3bed 100644 --- a/db/table_cache.cc +++ b/db/table_cache.cc @@ -225,8 +225,7 @@ InternalIterator* TableCache::NewIterator( } InternalIterator* result = nullptr; if (s.ok()) { - result = - table_reader->NewIterator(options, arena, &icomparator, skip_filters); + result = table_reader->NewIterator(options, arena, skip_filters); if (create_new_table_reader) { assert(handle == nullptr); result->RegisterCleanup(&DeleteTableReader, table_reader, nullptr); diff --git a/table/block_based_table_reader.cc b/table/block_based_table_reader.cc index 123e1814ab..3c4f0b80ee 100644 --- a/table/block_based_table_reader.cc +++ b/table/block_based_table_reader.cc @@ -1545,11 +1545,12 @@ bool BlockBasedTable::PrefixMayMatch(const Slice& internal_key) { return may_match; } -InternalIterator* BlockBasedTable::NewIterator( - const ReadOptions& read_options, Arena* arena, - const InternalKeyComparator* icomp, bool skip_filters) { +InternalIterator* BlockBasedTable::NewIterator(const ReadOptions& read_options, + Arena* arena, + bool skip_filters) { return NewTwoLevelIterator( - new BlockEntryIteratorState(this, read_options, icomp, skip_filters), + new BlockEntryIteratorState(this, read_options, + &rep_->internal_comparator, skip_filters), NewIndexIterator(read_options), arena); } diff --git a/table/block_based_table_reader.h b/table/block_based_table_reader.h index 857ea56057..8b3494ef56 100644 --- a/table/block_based_table_reader.h +++ b/table/block_based_table_reader.h @@ -102,7 +102,6 @@ class BlockBasedTable : public TableReader { // @param skip_filters Disables loading/accessing the filter block InternalIterator* NewIterator( const ReadOptions&, Arena* arena = nullptr, - const InternalKeyComparator* icomparator = nullptr, bool skip_filters = false) override; InternalIterator* NewRangeTombstoneIterator( diff --git a/table/cuckoo_table_reader.cc b/table/cuckoo_table_reader.cc index 85670ad1da..9cecebaebb 100644 --- a/table/cuckoo_table_reader.cc +++ b/table/cuckoo_table_reader.cc @@ -364,8 +364,7 @@ extern InternalIterator* NewErrorInternalIterator(const Status& status, Arena* arena); InternalIterator* CuckooTableReader::NewIterator( - const ReadOptions& read_options, Arena* arena, - const InternalKeyComparator* icomp, bool skip_filters) { + const ReadOptions& read_options, Arena* arena, bool skip_filters) { if (!status().ok()) { return NewErrorInternalIterator( Status::Corruption("CuckooTableReader status is not okay."), arena); diff --git a/table/cuckoo_table_reader.h b/table/cuckoo_table_reader.h index f2b6d1a9cf..4beac8f9d0 100644 --- a/table/cuckoo_table_reader.h +++ b/table/cuckoo_table_reader.h @@ -47,7 +47,6 @@ class CuckooTableReader: public TableReader { InternalIterator* NewIterator( const ReadOptions&, Arena* arena = nullptr, - const InternalKeyComparator* icomparator = nullptr, bool skip_filters = false) override; void Prepare(const Slice& target) override; diff --git a/table/mock_table.cc b/table/mock_table.cc index 4c9907e459..86c380865c 100644 --- a/table/mock_table.cc +++ b/table/mock_table.cc @@ -28,7 +28,6 @@ stl_wrappers::KVMap MakeMockFile( InternalIterator* MockTableReader::NewIterator(const ReadOptions&, Arena* arena, - const InternalKeyComparator*, bool skip_filters) { return new MockTableIterator(table_); } diff --git a/table/mock_table.h b/table/mock_table.h index 9e5396341c..71609a173f 100644 --- a/table/mock_table.h +++ b/table/mock_table.h @@ -40,7 +40,6 @@ class MockTableReader : public TableReader { InternalIterator* NewIterator(const ReadOptions&, Arena* arena, - const InternalKeyComparator* = nullptr, bool skip_filters = false) override; Status Get(const ReadOptions&, const Slice& key, GetContext* get_context, diff --git a/table/plain_table_reader.cc b/table/plain_table_reader.cc index 0f9449e866..92933b34ba 100644 --- a/table/plain_table_reader.cc +++ b/table/plain_table_reader.cc @@ -191,7 +191,6 @@ void PlainTableReader::SetupForCompaction() { InternalIterator* PlainTableReader::NewIterator(const ReadOptions& options, Arena* arena, - const InternalKeyComparator*, bool skip_filters) { bool use_prefix_seek = !IsTotalOrderMode() && !options.total_order_seek; if (arena == nullptr) { diff --git a/table/plain_table_reader.h b/table/plain_table_reader.h index 236bab4fd5..6bf8da2f98 100644 --- a/table/plain_table_reader.h +++ b/table/plain_table_reader.h @@ -71,7 +71,7 @@ class PlainTableReader: public TableReader { public: static Status Open(const ImmutableCFOptions& ioptions, const EnvOptions& env_options, - const InternalKeyComparator& icomparator, + const InternalKeyComparator& internal_comparator, unique_ptr&& file, uint64_t file_size, unique_ptr* table, const int bloom_bits_per_key, double hash_table_ratio, @@ -80,7 +80,6 @@ class PlainTableReader: public TableReader { InternalIterator* NewIterator(const ReadOptions&, Arena* arena = nullptr, - const InternalKeyComparator* = nullptr, bool skip_filters = false) override; void Prepare(const Slice& target) override; diff --git a/table/table_reader.h b/table/table_reader.h index 5f47468e6d..9681d54670 100644 --- a/table/table_reader.h +++ b/table/table_reader.h @@ -40,7 +40,6 @@ class TableReader { // option is effective only for block-based table format. virtual InternalIterator* NewIterator(const ReadOptions&, Arena* arena = nullptr, - const InternalKeyComparator* = nullptr, bool skip_filters = false) = 0; virtual InternalIterator* NewRangeTombstoneIterator(