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
This commit is contained in:
Yueh-Hsuan Chiang 2015-07-07 12:45:06 -07:00
parent 59b50dcef9
commit 57d216ea65

View File

@ -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();