mirror of https://github.com/facebook/rocksdb.git
MergingIterator assertion
Summary: I wrote a test that triggers assertion in MergingIterator. I have not touched that code ever, so I'm looking for somebody with good understanding of the MergingIterator code to fix this. The solution is probably a one-liner. Let me know if you're willing to take a look. Test Plan: This test fails with an assertion `use_heap_ == false` Reviewers: dhruba, haobo, sdong, kailiu Reviewed By: sdong CC: leveldb Differential Revision: https://reviews.facebook.net/D16521
This commit is contained in:
parent
2b5155fb29
commit
c0ccf43648
|
@ -1334,6 +1334,23 @@ TEST(DBTest, FilterDeletes) {
|
|||
} while (ChangeCompactOptions());
|
||||
}
|
||||
|
||||
|
||||
TEST(DBTest, IterSeekBeforePrev) {
|
||||
ASSERT_OK(Put("a", "b"));
|
||||
ASSERT_OK(Put("c", "d"));
|
||||
dbfull()->Flush(FlushOptions());
|
||||
ASSERT_OK(Put("0", "f"));
|
||||
ASSERT_OK(Put("1", "h"));
|
||||
dbfull()->Flush(FlushOptions());
|
||||
ASSERT_OK(Put("2", "j"));
|
||||
auto iter = db_->NewIterator(ReadOptions());
|
||||
iter->Seek(Slice("c"));
|
||||
iter->Prev();
|
||||
iter->Seek(Slice("a"));
|
||||
iter->Prev();
|
||||
delete iter;
|
||||
}
|
||||
|
||||
TEST(DBTest, IterEmpty) {
|
||||
do {
|
||||
Iterator* iter = db_->NewIterator(ReadOptions());
|
||||
|
|
Loading…
Reference in New Issue