From b012d2355738e91d49c2b36fe01a60ef6af8a521 Mon Sep 17 00:00:00 2001 From: Yanqin Jin Date: Tue, 21 Jun 2022 11:27:10 -0700 Subject: [PATCH] Destroy iniital db dir for a test in DBWALTest (#10221) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/10221 Reviewed By: hx235 Differential Revision: D37316280 Pulled By: riversand963 fbshipit-source-id: 062781acec2f36beebc62003bcc8ec280488d572 --- db/db_wal_test.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/db/db_wal_test.cc b/db/db_wal_test.cc index 646786b21..54451ff47 100644 --- a/db/db_wal_test.cc +++ b/db/db_wal_test.cc @@ -1497,6 +1497,8 @@ TEST_F(DBWALTest, RaceInstallFlushResultsWithWalObsoletion) { // The following make sure there are two bg flush threads. options.max_background_jobs = 8; + DestroyAndReopen(options); + const std::string cf1_name("cf1"); CreateAndReopenWithCF({cf1_name}, options); assert(handles_.size() == 2); @@ -1512,10 +1514,13 @@ TEST_F(DBWALTest, RaceInstallFlushResultsWithWalObsoletion) { ASSERT_OK(db_->Put(WriteOptions(), handles_[1], "foo", "value")); ASSERT_OK(db_->Put(WriteOptions(), "foo", "value")); - ASSERT_OK(dbfull()->TEST_FlushMemTable(false, true, handles_[1])); + ASSERT_OK(dbfull()->TEST_FlushMemTable( + /*wait=*/false, /*allow_write_stall=*/true, handles_[1])); ASSERT_OK(db_->Put(WriteOptions(), "foo", "value")); - ASSERT_OK(dbfull()->TEST_FlushMemTable(false, true, handles_[0])); + + ASSERT_OK(dbfull()->TEST_FlushMemTable( + /*wait=*/false, /*allow_write_stall=*/true, handles_[0])); bool called = false; SyncPoint::GetInstance()->DisableProcessing();