Skip to content

Commit f3ae3d0

Browse files
committed
Add more black-box tests for PlainTable and explicitly support total order mode
Summary: 1. Add some more implementation-aware tests for PlainTable 2. move from a hard-coded one index per 16 rows in one prefix to a configurable number. Also, make hash table ratio = 0 means binary search only. Also fixes some divide 0 risks. 3. Explicitly support total order (only use binary search) 4. some code cleaning up. Test Plan: make all check Reviewers: haobo, kailiu Reviewed By: haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D16023
1 parent e6b3e3b commit f3ae3d0

8 files changed

+805
-192
lines changed

db/db_impl.cc

+4-1
Original file line numberDiff line numberDiff line change
@@ -2754,7 +2754,10 @@ Iterator* DBImpl::NewInternalIterator(const ReadOptions& options,
27542754

27552755
Iterator* DBImpl::TEST_NewInternalIterator() {
27562756
SequenceNumber ignored;
2757-
return NewInternalIterator(ReadOptions(), &ignored);
2757+
ReadOptions read_options;
2758+
// Use prefix_seek to make the test function more useful.
2759+
read_options.prefix_seek = true;
2760+
return NewInternalIterator(read_options, &ignored);
27582761
}
27592762

27602763
std::pair<Iterator*, Iterator*> DBImpl::GetTailingIteratorPair(

0 commit comments

Comments
 (0)