From 99b61e3b9ba1b45c76cae8dd07244efb189c79aa Mon Sep 17 00:00:00 2001 From: groot Date: Fri, 10 May 2019 14:33:23 +0800 Subject: [PATCH] fix bug Former-commit-id: 4f365862e364a8b6232a9d959354dd609db6a040 --- cpp/src/server/VecServiceTask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/server/VecServiceTask.cpp b/cpp/src/server/VecServiceTask.cpp index ca6f83868..9eda08495 100644 --- a/cpp/src/server/VecServiceTask.cpp +++ b/cpp/src/server/VecServiceTask.cpp @@ -325,7 +325,6 @@ AddBatchVectorTask::AddBatchVectorTask(const std::string& group_id, bin_tensor_list_(tensor_list), tensor_ids_(ids) { tensor_ids_.clear(); - tensor_ids_.resize(tensor_list->tensor_list.size()); } BaseTaskPtr AddBatchVectorTask::Create(const std::string& group_id, @@ -469,6 +468,7 @@ ServerError AddBatchVectorTask::OnExecute() { SERVER_LOG_ERROR << "Vector ID not returned"; return SERVER_UNEXPECTED_ERROR; } else { + tensor_ids_.resize(vector_ids.size()); if(vec_count < USE_MT) { ProcessIdMapping(vector_ids, 0, vec_count, tensor_ids_); rc.Record("built id mapping"); -- GitLab