mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-25 14:31:35 +00:00
Deflaky ObsoleteFilesTest (#9049)
Summary:
WaitForFlushMemTable() may only wait for mem flush but not background flush
finishing. The the obsoleted file may not be purged yet.
fcaa7ff638/db/db_impl/db_impl_compaction_flush.cc (L2200-L2203)
Use WaitForCompact() instead to wait for background flush job.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/9049
Test Plan: `gtest-parallel ./obsolete_files_test --gtest_filter=ObsoleteFilesTest.DeleteObsoleteOptionsFile -r 1000`
Reviewed By: zhichao-cao
Differential Revision: D31737343
Pulled By: jay-zhuang
fbshipit-source-id: 82276ebeae7c7c75a733d3e1fd1c130d45e4761f
This commit is contained in:
parent
b4326b5273
commit
53a0ab2bea
|
@ -54,7 +54,9 @@ class ObsoleteFilesTest : public DBTestBase {
|
|||
AddKeys(numKeysPerFile, startKey);
|
||||
startKey += numKeysPerFile;
|
||||
ASSERT_OK(dbfull()->TEST_FlushMemTable());
|
||||
ASSERT_OK(dbfull()->TEST_WaitForFlushMemTable());
|
||||
ASSERT_OK(
|
||||
dbfull()->TEST_WaitForCompact()); // wait for background flush (flush
|
||||
// is also a kind of compaction).
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue