From 66010b41033dd3c8ef05db21c1438344ad73af87 Mon Sep 17 00:00:00 2001 From: sdong Date: Thu, 18 May 2017 12:32:46 -0700 Subject: [PATCH] column_family_test: EnvCounter::num_new_writable_file_ to be atomic Summary: TSAN shows warning of data race of EnvCounter::num_new_writable_file_. Make it atomic. Test Plan: Run all tests. --- db/column_family_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/column_family_test.cc b/db/column_family_test.cc index 7ebe0068bcf..1253df5de95 100644 --- a/db/column_family_test.cc +++ b/db/column_family_test.cc @@ -55,7 +55,7 @@ class EnvCounter : public EnvWrapper { } private: - int num_new_writable_file_; + std::atomic num_new_writable_file_; }; class ColumnFamilyTest : public testing::Test {