Skip to content

Commit

Permalink
Do not fail stage after already done
Browse files Browse the repository at this point in the history
Ignore failure within stage execution if it already done.
This is to work around the problem which was introduced with
39b04491c05.
With that change we close EventDrivenTaskSource when stage completes,
and as a result of that it may emit an failure event due to internall
processes being cancelled.
Handling of event in `StageExecution.fail()` did close a number of
objects needed for query completion (see createStageExecutionCloser()).
As a result the query could hang.
  • Loading branch information
losipiuk committed Dec 2, 2023
1 parent 62acd1b commit 3c498b7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2415,6 +2415,10 @@ public void abort()

public void fail(Throwable t)
{
if (stage.getState().isDone()) {
// stage already done; ignore
return;
}
Closer closer = createStageExecutionCloser();
closer.register(() -> stage.fail(t));
try {
Expand Down

0 comments on commit 3c498b7

Please sign in to comment.