#2692 Milvus hangs during multi-thread concurrent search (#2715)

* #2642 Create index failed caused by server crashed.

Signed-off-by: yhmo <yihua.mo@zilliz.com>

* changelog

Signed-off-by: yhmo <yihua.mo@zilliz.com>

* changelog

Signed-off-by: yhmo <yihua.mo@zilliz.com>

* typo

Signed-off-by: yhmo <yihua.mo@zilliz.com>

* #2692 Milvus hangs during multi-thread concurrent search

Signed-off-by: yhmo <yihua.mo@zilliz.com>
pull/2746/head
groot 2020-07-02 19:03:24 +08:00 committed by GitHub
parent 90bd54d23f
commit 367c72675c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -14,6 +14,7 @@ Please mark all change in change log and use the issue from GitHub
- \#2637 Suit the range of HNSW parameters
- \#2642 Create index failed and server crashed
- \#2649 Search parameter of annoy has conflict with document
- \#2692 Milvus hangs during multi-thread concurrent search
## Feature

View File

@ -127,6 +127,7 @@ BaseRequest::OnPostExecute() {
void
BaseRequest::Done() {
std::unique_lock<std::mutex> lock(finish_mtx_);
done_ = true;
finish_cond_.notify_all();
}

View File

@ -211,15 +211,16 @@ class BaseRequest {
protected:
const std::shared_ptr<milvus::server::Context> context_;
mutable std::mutex finish_mtx_;
std::condition_variable finish_cond_;
RequestType type_;
std::string request_group_;
bool async_;
bool done_;
Status status_;
private:
mutable std::mutex finish_mtx_;
std::condition_variable finish_cond_;
bool done_;
public:
const std::shared_ptr<milvus::server::Context>&
Context() const {