Skip to content

Commit

Permalink
db_iter.cc: DBIter::Next(): minor improve (facebook#7407)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebook#7407

Reviewed By: ajkr

Differential Revision: D23817122

Pulled By: jay-zhuang

fbshipit-source-id: 62bf43e4d780fad8c682edd750b4800b5b8f4a77
  • Loading branch information
rockeet authored and facebook-github-bot committed Sep 23, 2020
1 parent 5d6ff69 commit b005f96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions db/db_iter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ void DBIter::Next() {

local_stats_.next_count_++;
if (ok && iter_.Valid()) {
Slice prefix;
if (prefix_same_as_start_) {
assert(prefix_extractor_ != nullptr);
prefix = prefix_.GetUserKey();
const Slice prefix = prefix_.GetUserKey();
FindNextUserEntry(true /* skipping the current user key */, &prefix);
} else {
FindNextUserEntry(true /* skipping the current user key */, nullptr);
}
FindNextUserEntry(true /* skipping the current user key */,
prefix_same_as_start_ ? &prefix : nullptr);
} else {
is_key_seqnum_zero_ = false;
valid_ = false;
Expand Down

0 comments on commit b005f96

Please sign in to comment.