From d1f053b0aea325e65d741a2ff27aa78019381721 Mon Sep 17 00:00:00 2001 From: Levi Tamasi Date: Wed, 8 Dec 2021 11:15:32 -0800 Subject: [PATCH] Attempt to deflake DBSSTTest.DestroyDBWithRateLimitedDelete (#9269) Summary: This test case seems to be occasionally failing due to the code hitting the immediate deletion branch in `DeleteScheduler::DeleteFile`. The patch increases the allowed trash ratio to a huge value to prevent this from happening. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9269 Test Plan: ``` gtest-parallel --repeat=10000 ./db_sst_test --gtest_filter=DBSSTTest.DestroyDBWithRateLimitedDelete ``` Reviewed By: akankshamahajan15 Differential Revision: D32956596 Pulled By: ltamasi fbshipit-source-id: 3945e7c1c19ede76698e03c3f133bc1d9fd61b84 --- db/db_sst_test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/db_sst_test.cc b/db/db_sst_test.cc index 49e748d25..da4ab6c78 100644 --- a/db/db_sst_test.cc +++ b/db/db_sst_test.cc @@ -1030,7 +1030,9 @@ TEST_F(DBSSTTest, DestroyDBWithRateLimitedDelete) { auto sfm = static_cast(options.sst_file_manager.get()); sfm->SetDeleteRateBytesPerSecond(1024 * 1024); - sfm->delete_scheduler()->SetMaxTrashDBRatio(1.1); + // Set an extra high trash ratio to prevent immediate/non-rate limited + // deletions + sfm->delete_scheduler()->SetMaxTrashDBRatio(1000.0); ASSERT_OK(DestroyDB(dbname_, options)); sfm->WaitForEmptyTrash(); ASSERT_EQ(bg_delete_file, num_sst_files + num_wal_files);