From 12117b26a359dc4e9649994b96991acb0720b3ff Mon Sep 17 00:00:00 2001 From: sdong Date: Fri, 19 Nov 2021 10:08:06 -0800 Subject: [PATCH] Fix flaky DBTest2.RateLimitedCompactionReads (#9185) Summary: DBTest2.RateLimitedCompactionReads sometime shows following failure: what(): db/db_test2.cc:3976: Failure Expected equality of these values: i + 1 Which is: 4 NumTableFilesAtLevel(0) Which is: 0 The assertion itself doesn't appear to be correct. Fix it. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9185 Test Plan: Removing an assertion shouldn't break anything. Reviewed By: ajkr Differential Revision: D32549530 fbshipit-source-id: 9993372d8af89161f903337a13f3e316e690a6b8 --- db/db_test2.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/db_test2.cc b/db/db_test2.cc index 0ce6f1e4d..91a174ad6 100644 --- a/db/db_test2.cc +++ b/db/db_test2.cc @@ -3973,7 +3973,9 @@ TEST_F(DBTest2, RateLimitedCompactionReads) { ASSERT_OK(Put(Key(j), DummyString(kBytesPerKey))); } ASSERT_OK(dbfull()->TEST_WaitForFlushMemTable()); - ASSERT_EQ(i + 1, NumTableFilesAtLevel(0)); + if (i + 1 < kNumL0Files) { + ASSERT_EQ(i + 1, NumTableFilesAtLevel(0)); + } } ASSERT_OK(dbfull()->TEST_WaitForCompact()); ASSERT_EQ(0, NumTableFilesAtLevel(0));