瀏覽代碼

Merge pull request #679 from smartxworks:optimize-readseq

PiperOrigin-RevId: 246668103
main
Victor Costan 5 年之前
父節點
當前提交
9a56c49ed4
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. +9
    -0
      db/db_iter.cc

+ 9
- 0
db/db_iter.cc 查看文件

@ -160,6 +160,15 @@ void DBIter::Next() {
} else {
// Store in saved_key_ the current key so we skip it below.
SaveKey(ExtractUserKey(iter_->key()), &saved_key_);
// iter_ is pointing to current key. We can now safely move to the next to
// avoid checking current key.
iter_->Next();
if (!iter_->Valid()) {
valid_ = false;
saved_key_.clear();
return;
}
}
FindNextUserEntry(true, &saved_key_);

Loading…
取消
儲存