From 37e0fdc8247b3726c009ff9d88e39966f8438e3a Mon Sep 17 00:00:00 2001 From: Siying Dong Date: Tue, 17 Jul 2018 17:48:25 -0700 Subject: [PATCH] DBSSTTest.DeleteSchedulerMultipleDBPaths data race (#4146) Summary: Fix a minor data race in DBSSTTest.DeleteSchedulerMultipleDBPaths reported by TSAN Pull Request resolved: https://github.com/facebook/rocksdb/pull/4146 Differential Revision: D8880945 Pulled By: siying fbshipit-source-id: 25c632f685757735c59ad4ff26b2f346a443a446 --- db/db_sst_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_sst_test.cc b/db/db_sst_test.cc index 2781c61bf..46dbd0d40 100644 --- a/db/db_sst_test.cc +++ b/db/db_sst_test.cc @@ -436,7 +436,7 @@ TEST_F(DBSSTTest, OpenDBWithExistingTrash) { // deleted from first db_path were deleted using DeleteScheduler and // files in the second path were not. TEST_F(DBSSTTest, DeleteSchedulerMultipleDBPaths) { - int bg_delete_file = 0; + std::atomic bg_delete_file(0); rocksdb::SyncPoint::GetInstance()->SetCallBack( "DeleteScheduler::DeleteTrashFile:DeleteFile", [&](void* /*arg*/) { bg_delete_file++; });