未验证 提交 a5eec9d7 编写于 作者: G groot 提交者: GitHub

create index notify (#2003)

* create index notify
Signed-off-by: Nyhmo <yihua.mo@zilliz.com>

* typo
Signed-off-by: Nyhmo <yihua.mo@zilliz.com>

* typo
Signed-off-by: Ngroot <yihua.mo@zilliz.com>
上级 9e30c468
......@@ -1979,6 +1979,7 @@ DBImpl::BackgroundBuildIndex() {
}
LOG_ENGINE_DEBUG_ << "Background build index thread finished";
index_req_swn_.Notify(); // notify CreateIndex check circle
}
}
......@@ -2162,7 +2163,7 @@ DBImpl::WaitCollectionIndexRecursively(const std::string& collection_id, const C
status = meta_ptr_->UpdateCollectionFilesToIndex(collection_id);
}
std::this_thread::sleep_for(std::chrono::seconds(WAIT_BUILD_INDEX_INTERVAL));
index_req_swn_.Wait_For(std::chrono::seconds(WAIT_BUILD_INDEX_INTERVAL));
GetFilesToBuildIndex(collection_id, file_types, collection_files);
++times;
......
......@@ -344,6 +344,7 @@ class DBImpl : public DB, public server::CacheConfigHandler, public server::Engi
SimpleWaitNotify swn_index_;
SimpleWaitNotify flush_req_swn_;
SimpleWaitNotify index_req_swn_;
ThreadPool merge_thread_pool_;
std::mutex merge_result_mutex_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册