Attempt to deflake DBSSTTest.DBWithSFMForBlobFilesAtomicFlush (#9241)
Summary: When using the SST file manager, the actual deletion of DB files potentially occurs in the background. The patch adds another call to `SstFileManagerImpl::WaitForEmptyTrash` to the test case `DBSSTTest.DBWithSFMForBlobFilesAtomicFlush` to ensure the deletions are performed before the test checks the number of deleted files. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9241 Test Plan: ``` gtest-parallel --repeat=1000 ./db_sst_test --gtest_filter=DBSSTTest.DBWithSFMForBlobFilesAtomicFlush ``` Reviewed By: akankshamahajan15 Differential Revision: D32811427 Pulled By: ltamasi fbshipit-source-id: 7f2ad649a22bd2d7900e5f132372034093cfcf47
This commit is contained in:
parent
77c7085594
commit
930f2e92e6
@ -1664,15 +1664,21 @@ TEST_F(DBSSTTest, DBWithSFMForBlobFilesAtomicFlush) {
|
||||
ASSERT_OK(db_->CompactRange(CompactRangeOptions(), begin, end));
|
||||
|
||||
ASSERT_EQ(files_added, 1);
|
||||
ASSERT_EQ(files_deleted, 1);
|
||||
ASSERT_EQ(files_scheduled_to_delete, 1);
|
||||
|
||||
sfm->WaitForEmptyTrash();
|
||||
|
||||
ASSERT_EQ(files_deleted, 1);
|
||||
|
||||
Close();
|
||||
ASSERT_OK(DestroyDB(dbname_, options));
|
||||
sfm->WaitForEmptyTrash();
|
||||
ASSERT_EQ(files_deleted, 4);
|
||||
|
||||
ASSERT_EQ(files_scheduled_to_delete, 4);
|
||||
|
||||
sfm->WaitForEmptyTrash();
|
||||
|
||||
ASSERT_EQ(files_deleted, 4);
|
||||
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->DisableProcessing();
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->ClearAllCallBacks();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user