Skip to content

Commit

Permalink
[fix](FragmentMgr) Should not use operator[] for _query_ctx_map (#35095)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiang-hhhh authored May 21, 2024
1 parent dde0493 commit 0a264cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion be/src/runtime/fragment_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,10 @@ Status FragmentMgr::get_realtime_exec_status(const TUniqueId& query_id,

{
std::lock_guard<std::mutex> lock(_lock);
query_context = _query_ctx_map[query_id];
auto iter = _query_ctx_map.find(query_id);
if (iter != _query_ctx_map.end()) {
query_context = iter->second;
}
}

if (query_context == nullptr) {
Expand Down
1 change: 1 addition & 0 deletions be/src/service/backend_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,7 @@ void BaseBackendService::get_realtime_exec_status(TGetRealtimeExecStatusResponse
if (!request.__isset.id) {
LOG_WARNING("Invalidate argument, id is empty");
response.__set_status(Status::InvalidArgument("id is empty").to_thrift());
return;
}

LOG_INFO("Getting realtime exec status of query {}", print_id(request.id));
Expand Down

0 comments on commit 0a264cb

Please sign in to comment.