Skip to content

Commit

Permalink
[hotfix][coordination] Guard assumption in AdaptiveScheduler.Restarting
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger committed Mar 15, 2021
1 parent 18a9f02 commit e8c146e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.flink.runtime.executiongraph.TaskExecutionStateTransition;
import org.apache.flink.runtime.scheduler.ExecutionGraphHandler;
import org.apache.flink.runtime.scheduler.OperatorCoordinatorHandler;
import org.apache.flink.util.Preconditions;

import org.slf4j.Logger;

Expand Down Expand Up @@ -72,9 +73,8 @@ boolean updateTaskExecutionState(TaskExecutionStateTransition taskExecutionState

@Override
void onGloballyTerminalState(JobStatus globallyTerminalState) {
if (globallyTerminalState == JobStatus.CANCELED) {
context.runIfState(this, context::goToWaitingForResources, backoffTime);
}
Preconditions.checkArgument(globallyTerminalState == JobStatus.CANCELED);
context.runIfState(this, context::goToWaitingForResources, backoffTime);
}

/** Context of the {@link Restarting} state. */
Expand Down

0 comments on commit e8c146e

Please sign in to comment.