mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
avoid calling FindFile twice in TwoLevelIterator for PlainTable
Summary: this is to reclaim the regression introduced in https://reviews.facebook.net/D17853 Test Plan: make all check Reviewers: igor, haobo, sdong, dhruba, yhchiang Reviewed By: haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D17985
This commit is contained in:
@@ -18,14 +18,15 @@ struct ReadOptions;
|
||||
class InternalKeyComparator;
|
||||
|
||||
struct TwoLevelIteratorState {
|
||||
explicit TwoLevelIteratorState(bool prefix_enabled)
|
||||
: prefix_enabled(prefix_enabled) {}
|
||||
explicit TwoLevelIteratorState(bool check_prefix_may_match)
|
||||
: check_prefix_may_match(check_prefix_may_match) {}
|
||||
|
||||
virtual ~TwoLevelIteratorState() {}
|
||||
virtual Iterator* NewSecondaryIterator(const Slice& handle) = 0;
|
||||
virtual bool PrefixMayMatch(const Slice& internal_key) = 0;
|
||||
|
||||
bool prefix_enabled;
|
||||
// If call PrefixMayMatch()
|
||||
bool check_prefix_may_match;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user