From 718e192965cabb311feb7718d9cb8a2e34958072 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Wed, 30 Sep 2020 16:49:16 -0700 Subject: [PATCH] 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 --- db/db_compaction_test.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/db_compaction_test.cc b/db/db_compaction_test.cc index 5b14534ae..edb49db71 100644 --- a/db/db_compaction_test.cc +++ b/db/db_compaction_test.cc @@ -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();