This is an automated email from the ASF dual-hosted git repository.

mrhhsg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 51f03d892c2 [fix](pipeline_x) The execution loop of a task should be 
broken if the task is cancelled (#33938)
51f03d892c2 is described below

commit 51f03d892c2f1881b213d4fb13268df6e1960f89
Author: Jerry Hu <mrh...@gmail.com>
AuthorDate: Mon Apr 22 12:00:43 2024 +0800

    [fix](pipeline_x) The execution loop of a task should be broken if the task 
is cancelled (#33938)
---
 be/src/pipeline/pipeline_x/pipeline_x_task.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/be/src/pipeline/pipeline_x/pipeline_x_task.cpp 
b/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
index 6644da7b49a..6ffc5571b4e 100644
--- a/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
+++ b/be/src/pipeline/pipeline_x/pipeline_x_task.cpp
@@ -257,6 +257,14 @@ Status PipelineXTask::execute(bool* eos) {
             set_state(PipelineTaskState::BLOCKED_FOR_SINK);
             break;
         }
+
+        /// When a task is cancelled,
+        /// its blocking state will be cleared and it will transition to a 
ready state (though it is not truly ready).
+        /// Here, checking whether it is cancelled to prevent tasks in a 
blocking state from being re-executed.
+        if (_fragment_context->is_canceled()) {
+            break;
+        }
+
         if (time_spent > THREAD_TIME_SLICE) {
             COUNTER_UPDATE(_yield_counts, 1);
             break;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to