StephanEwen commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r667052349



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/SubtaskGatewayImpl.java
##########
@@ -72,19 +79,28 @@
         FutureUtils.assertNoException(
                 result.handleAsync(
                         (success, failure) -> {
-                            if (failure != null && 
subtaskAccess.isStillRunning()) {
-                                String msg =
-                                        String.format(
-                                                EVENT_LOSS_ERROR_MESSAGE,
-                                                evt,
-                                                subtaskAccess.subtaskName());
-                                subtaskAccess.triggerTaskFailover(new 
FlinkException(msg, failure));
+                            if (failure != null) {
+                                if (subtaskAccess.isStillRunning()) {
+                                    String msg =
+                                            String.format(
+                                                    EVENT_LOSS_ERROR_MESSAGE,
+                                                    evt,
+                                                    
subtaskAccess.subtaskName());
+                                    subtaskAccess.triggerTaskFailover(
+                                            new FlinkException(msg, failure));
+                                }
+
+                                
nonSuccessFuturesTrack.removeFailedFuture(result);

Review comment:
       It doesn't block the main thread. It just creates a conjunct future of 
all pending event futures and chains the checkpoint completion to that future. 
That is all fully async.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to