diff --git a/tddb/td/db/RocksDb.cpp b/tddb/td/db/RocksDb.cpp index a46d04b13..f1af0cf79 100644 --- a/tddb/td/db/RocksDb.cpp +++ b/tddb/td/db/RocksDb.cpp @@ -287,6 +287,7 @@ void RocksDbSnapshotStatistics::begin_snapshot(const rocksdb::Snapshot *snapshot } void RocksDbSnapshotStatistics::end_snapshot(const rocksdb::Snapshot *snapshot) { + auto lock = std::unique_lock(mutex_); auto id = reinterpret_cast(snapshot); auto it = id_to_ts_.find(id); CHECK(it != id_to_ts_.end());