Fix TSAN issue (#8477)

Summary:
Added mutex to fix TSAN issue

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8477

Reviewed By: zhichao-cao

Differential Revision: D29517053

Pulled By: mrambacher

fbshipit-source-id: 661ccb1f495b7d34874a79e0a3d7aea1123d6047
main
mrambacher 4 years ago committed by Facebook GitHub Bot
parent ba224b75c7
commit d45b837701
  1. 2
      db/db_test.cc

@ -1237,11 +1237,13 @@ TEST_F(DBTest, AllMetaDataTest) {
uint64_t start_time = static_cast<uint64_t>(temp_time);
Random rnd(301);
dbfull()->TEST_LockMutex();
for (int cf = 0; cf < 2; cf++) {
AddBlobFile(handles_[cf], blob_file_number * (cf + 1),
total_blob_count * (cf + 1), total_blob_bytes * (cf + 1),
checksum_method, checksum_value);
}
dbfull()->TEST_UnlockMutex();
std::vector<ColumnFamilyMetaData> all_meta;
db_->GetAllColumnFamilyMetaData(&all_meta);

Loading…
Cancel
Save