Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/2096#discussion_r68222088
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
---
@@ -1029,21 +1061,25 @@ else if (current == JobStatus.CANCELLING) {
}
}
else if (current == JobStatus.FAILING) {
- if
(restartStrategy.canRestart() && transitionState(current,
JobStatus.RESTARTING)) {
- // double check in case
that in the meantime a SuppressRestartsException was thrown
- if
(restartStrategy.canRestart()) {
-
restartStrategy.restart(this);
- break;
- } else {
- fail(new
Exception("ExecutionGraph went into RESTARTING state but " +
- "then
the restart strategy was disabled."));
- }
-
- } else if
(!restartStrategy.canRestart() && transitionState(current, JobStatus.FAILED,
failureCause)) {
+ boolean allowRestart =
!(failureCause instanceof SuppressRestartsException);
+
+ if (allowRestart &&
restartStrategy.canRestart() && transitionState(current, JobStatus.RESTARTING))
{
+
restartStrategy.restart(this);
+ break;
+ } else if ((!allowRestart ||
!restartStrategy.canRestart()) && transitionState(current, JobStatus.FAILED,
failureCause)) {
postRunCleanup();
break;
}
}
+ else if (current ==
JobStatus.SUSPENDED) {
+ // we've already cleaned up
when entering the SUSPENDED state
+ break;
+ }
+ else if
(current.isGloballyTerminalState()) {
+ LOG.warn("Job has entered
globally terminal state without waiting for all " +
+ "job vertices to reach
final state.");
+ break;
+ }
else {
fail(new
Exception("ExecutionGraph went into final state from state " + current));
--- End diff --
Yes you're right. The `break` is missing here. Will add it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---