This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 05260d6d47d [pipeline](fix) Logging blocking dependency if task is not
cancelled #34502
05260d6d47d is described below
commit 05260d6d47d36c4f04df1eff1bd9275527563ec2
Author: yiguolei <[email protected]>
AuthorDate: Wed May 8 10:34:26 2024 +0800
[pipeline](fix) Logging blocking dependency if task is not cancelled #34502
---
be/src/pipeline/pipeline_x/pipeline_x_task.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
b/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
index 64b11ceffb1..760fbd385e6 100644
--- a/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
+++ b/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
@@ -399,11 +399,15 @@ std::string PipelineXTask::debug_string() {
print_id(_state->fragment_instance_id()));
auto elapsed = (MonotonicNanos() - _fragment_context->create_time()) /
1000000000.0;
+ //If thread 1 executes this pipeline task and finds it has been cancelled,
it will clear the _blocked_dep.
+ // If at the same time FE cancel this pipeline task and logging
debug_string before _blocked_dep is cleared,
+ // it will think _blocked_dep is not nullptr and call
_blocked_dep->debug_string().
+ auto* cur_blocked_dep = _blocked_dep;
fmt::format_to(debug_string_buffer,
"PipelineTask[this = {}, state = {}, dry run = {}, elapse
time "
"= {}s], block dependency = {}, is running = {}\noperators:
",
(void*)this, get_state_name(_cur_state), _dry_run, elapsed,
- _blocked_dep && !_finished ? _blocked_dep->debug_string() :
"NULL",
+ cur_blocked_dep && !_finished ?
cur_blocked_dep->debug_string() : "NULL",
is_running());
for (size_t i = 0; i < _operators.size(); i++) {
fmt::format_to(debug_string_buffer, "\n{}",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]