Skip to content

Commit

Permalink
#2692 Milvus hangs during multi-thread concurrent search (#2715)
Browse files Browse the repository at this point in the history
* #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>
  • Loading branch information
groot committed Jul 2, 2020
1 parent 90bd54d commit 367c726
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions core/src/server/delivery/request/BaseRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ BaseRequest::OnPostExecute() {

void
BaseRequest::Done() {
std::unique_lock<std::mutex> lock(finish_mtx_);
done_ = true;
finish_cond_.notify_all();
}
Expand Down
9 changes: 5 additions & 4 deletions core/src/server/delivery/request/BaseRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 367c726

Please sign in to comment.