提交 7c3d6bdb 编写于 作者: K kun yu

fix search error handle bug


Former-commit-id: 8e671f56a9a729d24bb827bae2cbf7c760963a9f
上级 8afab6dd
......@@ -73,8 +73,14 @@ RequestHandler::SearchVector(::grpc::ServerContext* context, const ::milvus::grp
RequestHandler::SearchVectorInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchVectorInFilesInfos* request, ::grpc::ServerWriter<::milvus::grpc::TopKQueryResult>* writer) {
std::vector<std::string> file_id_array;
BaseTaskPtr task_ptr = SearchVectorTask::Create(request->search_vector_infos(), file_id_array, *writer);
RequestScheduler::ExecTask(task_ptr, nullptr);
return ::grpc::Status::OK;
::milvus::grpc::Status grpc_status;
RequestScheduler::ExecTask(task_ptr, &grpc_status);
if (grpc_status.error_code() != SERVER_SUCCESS) {
::grpc::Status status(::grpc::INVALID_ARGUMENT, grpc_status.reason());
return status;
} else {
return ::grpc::Status::OK;
}
}
::grpc::Status
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册