Fix flaky intra-L0 consistency failure regression tests (#7477)

Summary:
Do not assert the number of files after intra-L0 compaction is eligible to run since it could complete (and reduce the number of files) before the assertion executes.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7477

Reviewed By: pdillinger

Differential Revision: D24032049

Pulled By: ajkr

fbshipit-source-id: e838ac7a24651ebd643b9e5a9d39d2e789c46929
This commit is contained in:
Andrew Kryczka 2020-09-30 16:49:16 -07:00 committed by Facebook GitHub Bot
parent 58905f31c1
commit 718e192965

View File

@ -5345,8 +5345,8 @@ TEST_P(DBCompactionTestWithParam,
// Ingest 5 L0 sst. And this files would trigger PickIntraL0Compaction.
for (int i = 5; i < 10; i++) {
ASSERT_EQ(i, NumTableFilesAtLevel(0));
IngestOneKeyValue(dbfull(), Key(i), value, options);
ASSERT_EQ(i + 1, NumTableFilesAtLevel(0));
}
// Put one key, to make biggest log sequence number in this memtable is bigger
@ -5436,7 +5436,6 @@ TEST_P(DBCompactionTestWithParam,
ASSERT_EQ(i, NumTableFilesAtLevel(0));
IngestOneKeyValue(dbfull(), Key(i), value2, options);
}
ASSERT_EQ(10, NumTableFilesAtLevel(0));
// Wake up flush job
sleeping_tasks.WakeUp();