提交 57d216ea 编写于 作者: Y Yueh-Hsuan Chiang

Remove assert(current_ == CurrentReverse()) in MergingIterator::Prev()

Summary:
Remove assert(current_ == CurrentReverse()) in MergingIterator::Prev()
because it is possible to have some keys larger than the seek-key
inserted between Seek() and SeekToLast(), which makes current_ not
equal to CurrentReverse().

Test Plan: db_stress

Reviewers: igor, sdong, IslamAbdelRahman, anthony

Reviewed By: anthony

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D41331
上级 59b50dce
......@@ -186,9 +186,12 @@ class MergingIterator : public Iterator {
}
}
direction_ = kReverse;
// The loop retreated all non-current children to be < key() so current_
// should still be strictly the largest key.
assert(current_ == CurrentReverse());
// Note that we don't do assert(current_ == CurrentReverse()) here
// because it is possible to have some keys larger than the seek-key
// inserted between Seek() and SeekToLast(), which makes current_ not
// equal to CurrentReverse().
//
// assert(current_ == CurrentReverse());
}
current_->Prev();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册