提交 d45b8377 编写于 作者: M mrambacher 提交者: Facebook GitHub Bot

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
上级 ba224b75
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册