BlockBasedTable::ApproximateSize() should use total order seek (#6222)
Summary: Right now BlockBasedTable::ApproximateSize() uses default setting about whether to use total order seek. There is no reason for that. There is no reason to do any filtering for approximate size boundary key, and it may introduce bugs. Disable it. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6222 Test Plan: Run existing tests Differential Revision: D19184787 fbshipit-source-id: 64180660bd2800914fff75104172b61c06f0b1c9
This commit is contained in:
parent
873331fe49
commit
f295b099f6
@ -4093,8 +4093,10 @@ uint64_t BlockBasedTable::ApproximateOffsetOf(const Slice& key,
|
||||
TableReaderCaller caller) {
|
||||
BlockCacheLookupContext context(caller);
|
||||
IndexBlockIter iiter_on_stack;
|
||||
ReadOptions ro;
|
||||
ro.total_order_seek = true;
|
||||
auto index_iter =
|
||||
NewIndexIterator(ReadOptions(), /*disable_prefix_seek=*/false,
|
||||
NewIndexIterator(ro, /*disable_prefix_seek=*/true,
|
||||
/*input_iter=*/&iiter_on_stack, /*get_context=*/nullptr,
|
||||
/*lookup_context=*/&context);
|
||||
std::unique_ptr<InternalIteratorBase<IndexValue>> iiter_unique_ptr;
|
||||
@ -4112,8 +4114,10 @@ uint64_t BlockBasedTable::ApproximateSize(const Slice& start, const Slice& end,
|
||||
|
||||
BlockCacheLookupContext context(caller);
|
||||
IndexBlockIter iiter_on_stack;
|
||||
ReadOptions ro;
|
||||
ro.total_order_seek = true;
|
||||
auto index_iter =
|
||||
NewIndexIterator(ReadOptions(), /*disable_prefix_seek=*/false,
|
||||
NewIndexIterator(ro, /*disable_prefix_seek=*/true,
|
||||
/*input_iter=*/&iiter_on_stack, /*get_context=*/nullptr,
|
||||
/*lookup_context=*/&context);
|
||||
std::unique_ptr<InternalIteratorBase<IndexValue>> iiter_unique_ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user