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

lihaopeng 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 39590f95b0 [pipeline](load) return error status in pipeline load 
(#21303)
39590f95b0 is described below

commit 39590f95b0b1785d95713961f846ff2715643821
Author: HappenLee <[email protected]>
AuthorDate: Wed Jul 5 16:13:32 2023 +0800

    [pipeline](load) return error status in pipeline load (#21303)
---
 be/src/pipeline/task_scheduler.cpp | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/be/src/pipeline/task_scheduler.cpp 
b/be/src/pipeline/task_scheduler.cpp
index 37833c3c27..90cab1075a 100644
--- a/be/src/pipeline/task_scheduler.cpp
+++ b/be/src/pipeline/task_scheduler.cpp
@@ -332,13 +332,16 @@ void TaskScheduler::_try_close_task(PipelineTask* task, 
PipelineTaskState state)
         _blocked_task_scheduler->add_blocked_task(task);
     } else {
         auto status = task->close();
-        if (!status.ok()) {
-            // TODO: LOG warning
-        }
-        if (task->is_pending_finish()) {
-            task->set_state(PipelineTaskState::PENDING_FINISH);
-            _blocked_task_scheduler->add_blocked_task(task);
-            return;
+        if (!status.ok() && state != PipelineTaskState::CANCELED) {
+            
task->fragment_context()->cancel(PPlanFragmentCancelReason::INTERNAL_ERROR,
+                                             status.to_string());
+            state = PipelineTaskState::CANCELED;
+        } else {
+            if (task->is_pending_finish()) {
+                task->set_state(PipelineTaskState::PENDING_FINISH);
+                _blocked_task_scheduler->add_blocked_task(task);
+                return;
+            }
         }
         task->set_state(state);
         task->fragment_context()->close_a_pipeline();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to