StefanRRichter commented on a change in pull request #8322: [FLINK-12364]
Introduce a CheckpointFailureManager to centralized manage checkpoint failure
URL: https://github.com/apache/flink/pull/8322#discussion_r292959387
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -1329,10 +1331,35 @@ private void discardCheckpoint(PendingCheckpoint
pendingCheckpoint, @Nullable Th
LOG.info("Discarding checkpoint {} of job {}.", checkpointId,
job, cause);
- if (cause == null || cause instanceof
CheckpointDeclineException) {
-
pendingCheckpoint.abort(CheckpointFailureReason.CHECKPOINT_DECLINED, cause);
+ if (cause == null) {
Review comment:
Is there any harm in just rewriting this as
```
if (cause == null) {
failPendingCheckpoint(pendingCheckpoint,
CheckpointFailureReason.CHECKPOINT_DECLINED);
} else if (cause instanceof CheckpointException) {
CheckpointException exception = (CheckpointException)
cause;
failPendingCheckpoint(pendingCheckpoint,
exception.getCheckpointFailureReason(), cause);
} else {
failPendingCheckpoint(pendingCheckpoint,
CheckpointFailureReason.JOB_FAILURE, cause);
}
```
?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services