gaoyunhaii commented on a change in pull request #14857:
URL: https://github.com/apache/flink/pull/14857#discussion_r665305990
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SubtaskCheckpointCoordinatorImpl.java
##########
@@ -406,6 +406,31 @@ public void initInputsCheckpoint(long id,
CheckpointOptions checkpointOptions)
}
}
+ public void waitForPendingCheckpoints() throws Exception {
+ if (!enableCheckpointAfterTasksFinished) {
+ return;
+ }
+
+ List<AsyncCheckpointRunnable> asyncCheckpointRunnables;
+ synchronized (lock) {
+ asyncCheckpointRunnables = new ArrayList<>(checkpoints.values());
+ }
+
+ // Waits for each checkpoint independently.
+ asyncCheckpointRunnables.forEach(
+ ar -> {
+ try {
+ ar.getFinishedFuture().get();
+ } catch (Exception e) {
+ LOG.error(
Review comment:
I think here perhaps here we do not want to cause failover if one async
runnable completed exceptionally ? For normal execution the async runnable fail
seems also only fail the checkpoint but do not cause failover~
--
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]