yiguolei commented on code in PR #32578:
URL: https://github.com/apache/doris/pull/32578#discussion_r1533164343
##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -1042,7 +1042,8 @@ void FragmentMgr::cancel_instance_unlocked(const
TUniqueId& instance_id,
void FragmentMgr::cancel_fragment(const TUniqueId& query_id, int32_t
fragment_id,
const PPlanFragmentCancelReason& reason,
const std::string& msg) {
- if (auto q_ctx = _query_ctx_map.find(query_id)->second) {
+ if (auto q_ctx_iter = _query_ctx_map.find(query_id); q_ctx_iter !=
_query_ctx_map.end()) {
Review Comment:
should lock std::lock_guard<std::mutex> lock(_lock);
because other thread may modify _query_ctx_map concurrently.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]