Skip to content

Commit

Permalink
Add forgotten mutex lock on RocksDb::end_snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
EmelyanenkoK committed Jul 30, 2024
1 parent db1ba2e commit 8714477
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tddb/td/db/RocksDb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::mutex>(mutex_);
auto id = reinterpret_cast<std::uintptr_t>(snapshot);
auto it = id_to_ts_.find(id);
CHECK(it != id_to_ts_.end());
Expand Down

0 comments on commit 8714477

Please sign in to comment.