From e127fe18c3ee0d99b4507f1e2b7cfcb38a653e74 Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Wed, 30 Sep 2020 17:21:16 -0700 Subject: [PATCH] Fix TSAN failure for backupable_db_test (#7478) Summary: It's a transient failure, but can be reproduce with running the test 100 times: https://app.circleci.com/pipelines/github/facebook/rocksdb/3760/workflows/de909685-f22b-45ba-a8f3-6ebb78a54e96/jobs/37039 Pull Request resolved: https://github.com/facebook/rocksdb/pull/7478 Test Plan: re-run the test 100 times Reviewed By: ajkr Differential Revision: D24035758 Pulled By: jay-zhuang fbshipit-source-id: 6b31983d5c3f7faa8d5481306098513485d0d69d --- utilities/backupable/backupable_db_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/backupable/backupable_db_test.cc b/utilities/backupable/backupable_db_test.cc index ba501420b..dfc809b16 100644 --- a/utilities/backupable/backupable_db_test.cc +++ b/utilities/backupable/backupable_db_test.cc @@ -1423,7 +1423,7 @@ TEST_F(BackupableDBTest, TableFileWithoutDbChecksumCorruptedDuringBackup) { kShareWithChecksum); FillDB(db_.get(), 0, keys_iteration); - bool corrupted = false; + std::atomic corrupted{false}; // corrupt files when copying to the backup directory SyncPoint::GetInstance()->SetCallBack( "BackupEngineImpl::CopyOrCreateFile:CorruptionDuringBackup",