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

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 37ade2949fc2f94e2600c4ea73e5fe6574c05f1f
Author: HappenLee <happen...@hotmail.com>
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 06baaaecaa..948f64f73a 100644
--- a/be/src/pipeline/task_scheduler.cpp
+++ b/be/src/pipeline/task_scheduler.cpp
@@ -331,13 +331,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: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to