pnowojski commented on a change in pull request #17331:
URL: https://github.com/apache/flink/pull/17331#discussion_r713832913
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -1955,6 +1959,25 @@ private void abortPendingCheckpoint(
}
}
+ private void handleCheckpointException(
+ PendingCheckpoint pendingCheckpoint,
+ CheckpointProperties checkpointProperties,
+ CheckpointException exception,
+ ExecutionAttemptID executionAttemptID) {
+ if (checkpointProperties.isSavepoint()
+ && (checkpointProperties.isSynchronous() || pendingCheckpoint
== null)) {
+ failureManager.handleSynchronousSavepointFailure(exception);
Review comment:
I don't understand this condition. Why `pendingCheckpoint == null` and
non-synchronous savepoints are falling into
`handleSynchronousSavepointFailure(...)`?
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -1955,6 +1959,25 @@ private void abortPendingCheckpoint(
}
}
+ private void handleCheckpointException(
+ PendingCheckpoint pendingCheckpoint,
Review comment:
`@Nullable` and ditto for `executionAttemptID`
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -1955,6 +1963,25 @@ private void abortPendingCheckpoint(
}
}
+ private void handleCheckpointException(
+ PendingCheckpoint pendingCheckpoint,
+ CheckpointProperties checkpointProperties,
+ CheckpointException exception,
+ ExecutionAttemptID executionAttemptID) {
+ if (checkpointProperties.isSavepoint()
+ && (checkpointProperties.isSynchronous() || pendingCheckpoint
== null)) {
+ failureManager.handleSynchronousSavepointFailure(exception);
+ } else if (executionAttemptID != null && pendingCheckpoint != null) {
+ failureManager.handleTaskLevelCheckpointException(
+ exception, pendingCheckpoint.getCheckpointId(),
executionAttemptID);
+ } else if (pendingCheckpoint != null) {
+ failureManager.handleJobLevelCheckpointException(
+ exception, pendingCheckpoint.getCheckpointId());
+ } else {
+ failureManager.handleJobLevelCheckpointException(exception);
+ }
+ }
Review comment:
Wouldn't it be better to have this logic inside
`CheckpointFailureManager`? On this level it's pretty obfuscated what differs
between `handleSynchronousSavepointFailure` `handleJobLevelCheckpointException`
anyway.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]