mirror of https://github.com/facebook/rocksdb.git
Fix unit test tsan failure (#11828)
Summary: The test DBCompactionWaitForCompactTest.WaitForCompactWithOptionToFlushAndCloseDB failed tsan in https://app.circleci.com/pipelines/github/facebook/rocksdb/32009/workflows/577e4e1f-a909-4e80-8ef4-af98b5ff7446/jobs/660989. I cannot repro locally, but this should be the fix. Pull Request resolved: https://github.com/facebook/rocksdb/pull/11828 Test Plan: `./db_compaction_test --gtest_filter="*DBCompactionWaitForCompactTest/DBCompactionWaitForCompactTest.*"` Reviewed By: jaykorean Differential Revision: D49241904 Pulled By: cbi42 fbshipit-source-id: 68714c836d982dcb3946da104533d5c0594980de
This commit is contained in:
parent
3db2cf113d
commit
3285ba7a29
|
@ -3536,12 +3536,12 @@ TEST_P(DBCompactionWaitForCompactTest,
|
|||
// (has_unpersisted_data_ true) Check to make sure there's no extra L0 file
|
||||
// created from WAL. Re-opening DB won't trigger any flush or compaction
|
||||
|
||||
int compaction_finished = 0;
|
||||
std::atomic_int compaction_finished = 0;
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->SetCallBack(
|
||||
"DBImpl::BackgroundCompaction:Finish",
|
||||
[&](void*) { compaction_finished++; });
|
||||
|
||||
int flush_finished = 0;
|
||||
std::atomic_int flush_finished = 0;
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->SetCallBack(
|
||||
"FlushJob::End", [&](void*) { flush_finished++; });
|
||||
|
||||
|
|
Loading…
Reference in New Issue