When Options.max_num_files=-1, non level0 files also by pass table cache

Summary:
This is the part that was not finished when doing the Options.max_num_files=-1 feature. For iterating non level0 SST files (which was done using two level iterator), table cache is not bypassed. With this patch, the leftover feature is done.

Test Plan: make all check; change Options.max_num_files=-1 in one of the tests to cover the codes.

Reviewers: haobo, igor, dhruba, ljin, yhchiang

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D17001
This commit is contained in:
sdong
2014-03-20 17:32:55 -07:00
parent b9ce156e38
commit 6b2e7a2a01
4 changed files with 32 additions and 23 deletions

View File

@@ -3330,6 +3330,7 @@ TEST(DBTest, InPlaceUpdateCallbackNoAction) {
TEST(DBTest, CompactionFilter) {
Options options = CurrentOptions();
options.max_open_files = -1;
options.num_levels = 3;
options.max_mem_compaction_level = 0;
options.compaction_filter_factory = std::make_shared<KeepFilterFactory>();