Gabriel39 commented on code in PR #23142:
URL: https://github.com/apache/doris/pull/23142#discussion_r1327393065
##########
be/src/pipeline/pipeline_fragment_context.cpp:
##########
@@ -344,53 +359,31 @@ Status PipelineFragmentContext::_build_pipeline_tasks(
return Status::OK();
}
-void PipelineFragmentContext::_stop_report_thread() {
- if (!_report_thread_active) {
- return;
+void PipelineFragmentContext::_init_next_report_time() {
+ if (_is_report_success && config::status_report_interval > 0) {
+ VLOG_FILE << "report_profile(): instance_id=" <<
_runtime_state->fragment_instance_id();
Review Comment:
`_runtime_state` does not have instance id in `PipelineXFragmentContext`
##########
be/src/pipeline/pipeline_fragment_context.cpp:
##########
@@ -146,16 +144,30 @@ PipelineFragmentContext::~PipelineFragmentContext() {
} else {
_call_back(_runtime_state.get(), &st);
}
- DCHECK(!_report_thread_active);
}
void PipelineFragmentContext::cancel(const PPlanFragmentCancelReason& reason,
const std::string& msg) {
+ LOG_INFO("PipelineFragmentContext::cancel")
+ .tag("query_id", print_id(_query_ctx->query_id()))
+ .tag("fragment_id", _fragment_id)
+ .tag("instance_id",
print_id(_runtime_state->fragment_instance_id()))
+ .tag("reason", PPlanFragmentCancelReason_Name(reason))
+ .tag("message", msg);
+
if (_query_ctx->cancel(true, msg, Status::Cancelled(msg))) {
- LOG(WARNING) << "PipelineFragmentContext "
- << PrintInstanceStandardInfo(_query_id, _fragment_id,
_fragment_instance_id)
- << " is canceled, cancel message: " << msg;
+ if (reason != PPlanFragmentCancelReason::LIMIT_REACH) {
+ LOG(WARNING) << "PipelineFragmentContext "
+ << PrintInstanceStandardInfo(_query_id, _fragment_id,
+ _fragment_instance_id)
+ << " is canceled, cancel message: " << msg;
+
+ } else {
+ _set_is_report_on_cancel(false);
+ }
+ _runtime_state->set_is_cancelled(true, msg);
Review Comment:
Do not need to set runtime filter because we already use a global query ctx
to cancel and runtime state will retrieve it if need
##########
be/src/common/status.h:
##########
@@ -371,7 +371,7 @@ class Status {
status._err_msg->_msg = fmt::format(msg,
std::forward<Args>(args)...);
}
#ifdef ENABLE_STACKTRACE
- if constexpr (stacktrace && capture_stacktrace(code)) {
+ if constexpr (stacktrace && capture_stacktrace(code) && code != 0) {
Review Comment:
`capture_stacktrace(code)` already denies this condition if code = 0
--
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]