提交 bfc58766 编写于 作者: W wxyu

MS-611 Add resources validity check in ResourceMgr


Former-commit-id: 412b81d90bbea6171ceaddba9b760b5b9c79d5f0
上级 02a76910
......@@ -104,6 +104,10 @@ ResourceMgr::Connect(const std::string& name1, const std::string& name2, Connect
void
ResourceMgr::Clear() {
std::lock_guard<std::mutex> lck(resources_mutex_);
if (running_) {
ENGINE_LOG_ERROR << "ResourceMgr is running, cannot clear.";
return;
}
disk_resources_.clear();
cpu_resources_.clear();
gpu_resources_.clear();
......
......@@ -34,6 +34,7 @@ static constexpr size_t PARALLEL_REDUCE_BATCH = 1000;
std::mutex XSearchTask::merge_mutex_;
// TODO(wxyu): remove unused code
// bool
// NeedParallelReduce(uint64_t nq, uint64_t topk) {
// server::ServerConfig &config = server::ServerConfig::GetInstance();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册