-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
column_family_test: EnvCounter::num_new_writable_file_ to be atomic #2331
Conversation
Summary: TSAN shows warning of data race of EnvCounter::num_new_writable_file_. Make it atomic. Test Plan: Run all tests.
@siying has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
The TSAN warning: [ RUN ] ColumnFamilyTest.SameCFManualAutomaticConflictWARNING: ThreadSanitizer: data race (pid=47784) Previous write of size 4 at 0x7d0800076398 by thread T19: Location is heap block of size 32 at 0x7d0800076380 allocated by main thread: Thread T18 'rocksdb:bg1' (tid=49212, running) created by main thread at: Thread T19 'rocksdb:bg2' (tid=49213, running) created by main thread at: SUMMARY: ThreadSanitizer: data race db/column_family_test.cc:53 rocksdb::EnvCounter::NewWritableFile(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::unique_ptr<rocksdb::WritableFile, std::default_deleterocksdb::WritableFile >*, rocksdb::EnvOptions const&) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if build passes.
Summary: TSAN shows warning of data race of EnvCounter::num_new_writable_file_. Make it atomic.
Test Plan: Run all tests.