mirror of https://github.com/facebook/rocksdb.git
Relax verification condition of DBTest.SuggestCompactRangeTest
Summary: Verifiction condition of DBTest.SuggestCompactRangeTest is too strict. Based on key distribution, we might have more small files in last level. Not check number of files in the last level. Test Plan: Run DBTest.SuggestCompactRangeTest with both of jemalloc on and off. Reviewers: rven, IslamAbdelRahman, yhchiang, kradhakrishnan, igor, anthony Reviewed By: anthony Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D51501
This commit is contained in:
parent
f9103d9a30
commit
bcd7bd1229
|
@ -8683,10 +8683,12 @@ TEST_F(DBTest, SuggestCompactRangeTest) {
|
|||
dbfull()->TEST_WaitForCompact();
|
||||
}
|
||||
|
||||
ASSERT_EQ("0,0,13", FilesPerLevel(0));
|
||||
// All files are compacted
|
||||
ASSERT_EQ(0, NumTableFilesAtLevel(0));
|
||||
ASSERT_EQ(0, NumTableFilesAtLevel(1));
|
||||
|
||||
GenerateNewRandomFile(&rnd);
|
||||
ASSERT_EQ("1,0,13", FilesPerLevel(0));
|
||||
ASSERT_EQ(1, NumTableFilesAtLevel(0));
|
||||
|
||||
// nonoverlapping with the file on level 0
|
||||
Slice start("a"), end("b");
|
||||
|
@ -8694,7 +8696,7 @@ TEST_F(DBTest, SuggestCompactRangeTest) {
|
|||
dbfull()->TEST_WaitForCompact();
|
||||
|
||||
// should not compact the level 0 file
|
||||
ASSERT_EQ("1,0,13", FilesPerLevel(0));
|
||||
ASSERT_EQ(1, NumTableFilesAtLevel(0));
|
||||
|
||||
start = Slice("j");
|
||||
end = Slice("m");
|
||||
|
@ -8704,7 +8706,8 @@ TEST_F(DBTest, SuggestCompactRangeTest) {
|
|||
options.compaction_filter_factory.get()));
|
||||
|
||||
// now it should compact the level 0 file
|
||||
ASSERT_EQ("0,1,13", FilesPerLevel(0));
|
||||
ASSERT_EQ(0, NumTableFilesAtLevel(0));
|
||||
ASSERT_EQ(1, NumTableFilesAtLevel(1));
|
||||
}
|
||||
|
||||
TEST_F(DBTest, PromoteL0) {
|
||||
|
|
Loading…
Reference in New Issue