Skip to content

Commit

Permalink
column_family_test: EnvCounter::num_new_writable_file_ to be atomic
Browse files Browse the repository at this point in the history
Summary:
TSAN shows warning of data race of EnvCounter::num_new_writable_file_. Make it atomic.
Closes #2331

Differential Revision: D5089215

Pulled By: siying

fbshipit-source-id: 15f6dcfb770a3310cbb6337c22482c8b330daffc
  • Loading branch information
siying authored and facebook-github-bot committed May 18, 2017
1 parent 9f839a7 commit 217b866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/column_family_test.cc
Expand Up @@ -55,7 +55,7 @@ class EnvCounter : public EnvWrapper {
}

private:
int num_new_writable_file_;
std::atomic<int> num_new_writable_file_;
};

class ColumnFamilyTest : public testing::Test {
Expand Down

0 comments on commit 217b866

Please sign in to comment.