Browse Source

!232 fix bug, in some cases, failed to find the user's context info

From: @xu-yfei
Reviewed-by: @zhangyinxia,@zhoufeng54
Signed-off-by: @zhangyinxia
pull/232/MERGE
mindspore-ci-bot Gitee 5 years ago
parent
commit
99abcabd36
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      mindspore_serving/ccsrc/worker/work_executor.cc

+ 4
- 1
mindspore_serving/ccsrc/worker/work_executor.cc View File

@@ -251,7 +251,10 @@ Status WorkExecutor::Work(const RequestSpec &request_spec, const std::vector<Ins
context.user_context = user_context;
}
infer_session.instances = instances;
infer_session_map_[user_id] = infer_session;
{
std::unique_lock<std::mutex> lock(infer_session_map_mutex_);
infer_session_map_[user_id] = infer_session;
}

if (!method_def.preprocess_name.empty()) {
OnReceivePreprocessInputs(instances);


Loading…
Cancel
Save