yangzhg commented on a change in pull request #8248: URL: https://github.com/apache/incubator-doris/pull/8248#discussion_r817567354
########## File path: be/src/runtime/fragment_mgr.cpp ########## @@ -250,15 +247,18 @@ Status FragmentExecState::cancel_before_execute() { return Status::OK(); } -Status FragmentExecState::cancel(const PPlanFragmentCancelReason& reason) { - std::lock_guard<std::mutex> l(_status_lock); - RETURN_IF_ERROR(_exec_status); - if (reason == PPlanFragmentCancelReason::LIMIT_REACH) { - _executor.set_is_report_on_cancel(false); - } - _executor.cancel(); - if (_pipe != nullptr) { - _pipe->cancel(PPlanFragmentCancelReason_Name(reason)); +Status FragmentExecState::cancel(const PPlanFragmentCancelReason& reason, const std::string& msg) { + if (!_cancelled) { + _cancelled = true; Review comment: this is an bool type, and only set to true, so I think it is no need to use a lock -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org