mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +08:00
create index notify (#2003)
* create index notify Signed-off-by: yhmo <yihua.mo@zilliz.com> * typo Signed-off-by: yhmo <yihua.mo@zilliz.com> * typo Signed-off-by: groot <yihua.mo@zilliz.com>
This commit is contained in:
parent
9e30c468ff
commit
a5eec9d7b4
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user