Skip to content

Commit

Permalink
[pipeline](close) change the close order in pipeline engine (#27290)
Browse files Browse the repository at this point in the history
  • Loading branch information
HappenLee authored Nov 21, 2023
1 parent b63f009 commit fcf7691
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions be/src/pipeline/task_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,8 @@ void TaskScheduler::_try_close_task(PipelineTask* task, PipelineTaskState state,
auto try_close_failed = !status.ok() && state != PipelineTaskState::CANCELED;
if (try_close_failed) {
cancel();
// Call `close` if `try_close` failed to make sure allocated resources are released
static_cast<void>(task->close(exec_status));
} else if (!task->is_pipelineX() && task->is_pending_finish()) {
}
if (!task->is_pipelineX() && task->is_pending_finish()) {
task->set_state(PipelineTaskState::PENDING_FINISH);
static_cast<void>(_blocked_task_scheduler->add_blocked_task(task));
task->set_running(false);
Expand All @@ -380,6 +379,7 @@ void TaskScheduler::_try_close_task(PipelineTask* task, PipelineTaskState state,
task->set_running(false);
return;
}

status = task->close(exec_status);
if (!status.ok() && state != PipelineTaskState::CANCELED) {
cancel();
Expand Down

0 comments on commit fcf7691

Please sign in to comment.