Skip to content

Commit 63c68ce

Browse files
Gabriel39dataroaring
authored andcommitted
[pipeline](fix) Set upstream operators always runnable once source operator closed (#37297)
Some kinds of source operators has a 1-1 relationship with a sink operator (such as AnalyticOperator). We must ensure AnalyticSinkOperator will not be blocked if AnalyticSourceOperator already closed.
1 parent 010cf52 commit 63c68ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

be/src/pipeline/exec/operator.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,11 @@ Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
498498
_peak_memory_usage_counter->set(_mem_tracker->peak_consumption());
499499
}
500500
_closed = true;
501+
// Some kinds of source operators has a 1-1 relationship with a sink operator (such as AnalyticOperator).
502+
// We must ensure AnalyticSinkOperator will not be blocked if AnalyticSourceOperator already closed.
503+
if (_shared_state && _shared_state->sink_deps.size() == 1) {
504+
_shared_state->sink_deps.front()->set_always_ready();
505+
}
501506
return Status::OK();
502507
}
503508

0 commit comments

Comments
 (0)