未验证 提交 ce60e7e1 编写于 作者: X XuPeng-SH 提交者: GitHub

add mutex in OnReaderTimer (#4411) (#4433)

Signed-off-by: Npeng.xu <peng.xu@zilliz.com>
上级 cd6a910d
......@@ -294,6 +294,7 @@ Snapshots::OnReaderTimer(const boost::system::error_code& ec) {
// TODO: Should not happen
continue;
}
std::unique_lock<std::shared_timed_mutex> lock(mutex_);
alive_cids_.erase(cid);
name_id_map_.erase(ss->GetName());
holders_.erase(cid);
......@@ -353,7 +354,6 @@ Snapshots::Reset() {
void
Snapshots::SnapshotGCCallback(Snapshot::Ptr ss_ptr) {
ss_ptr->UnRef();
LOG_ENGINE_DEBUG_ << "Snapshot " << ss_ptr->GetID() << " ref_count = " << ss_ptr->ref_count() << " To be removed";
}
Status
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册