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
main
Yueh-Hsuan Chiang 9 years ago
parent 59b50dcef9
commit 57d216ea65
  1. 9
      table/merger.cc

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

Loading…
Cancel
Save