mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 21:09:06 +08:00
Merge branch 'branch-0.3.0' into 'branch-0.3.0'
MS-76 fix pipeline crash bug See merge request megasearch/vecwise_engine!82 Former-commit-id: 4bfb462d7762632499a1170c20280874df61362f
This commit is contained in:
commit
2f6ad0dfc6
@ -34,6 +34,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
||||
- MS-32 - Fix thrift error
|
||||
- MS-34 - Fix prometheus-cpp thirdparty
|
||||
- MS-67 - Fix license check bug
|
||||
- MS-76 - Fix pipeline crash bug
|
||||
|
||||
## Improvement
|
||||
|
||||
|
@ -21,7 +21,7 @@ void ClusterResult(const std::vector<long> &output_ids,
|
||||
for (auto i = 0; i < nq; i++) {
|
||||
SearchContext::Id2ScoreMap id_score;
|
||||
for (auto k = 0; k < topk; k++) {
|
||||
uint64_t index = i * nq + k;
|
||||
uint64_t index = i * topk + k;
|
||||
id_score.push_back(std::make_pair(output_ids[index], output_distence[index]));
|
||||
}
|
||||
result_set.emplace_back(id_score);
|
||||
@ -125,11 +125,6 @@ bool SearchTask::DoSearch() {
|
||||
try {
|
||||
index_engine_->Search(context->nq(), context->vectors(), inner_k, output_distence.data(),
|
||||
output_ids.data());
|
||||
} catch (std::exception& ex) {
|
||||
SERVER_LOG_ERROR << "SearchTask encounter exception: " << ex.what();
|
||||
context->IndexSearchDone(index_id_);//mark as done avoid dead lock, even search failed
|
||||
continue;
|
||||
}
|
||||
|
||||
rc.Record("do search");
|
||||
|
||||
@ -147,6 +142,12 @@ bool SearchTask::DoSearch() {
|
||||
context->GetResult().swap(result_set);
|
||||
rc.Record("calculate score");
|
||||
|
||||
} catch (std::exception& ex) {
|
||||
SERVER_LOG_ERROR << "SearchTask encounter exception: " << ex.what();
|
||||
context->IndexSearchDone(index_id_);//mark as done avoid dead lock, even search failed
|
||||
continue;
|
||||
}
|
||||
|
||||
//step 6: notify to send result to client
|
||||
context->IndexSearchDone(index_id_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user