lindong28 commented on code in PR #20752:
URL: https://github.com/apache/flink/pull/20752#discussion_r963209555


##########
flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/SubtaskGatewayImpl.java:
##########
@@ -207,8 +204,8 @@ void markForCheckpoint(long checkpointId) {
     boolean tryCloseGateway(long checkpointId) {
         checkRunsInMainThread();
 
-        if (checkpointId == currentCheckpointId) {
-            isClosed = true;
+        if (currentMarkedCheckpointIds.contains(checkpointId)) {
+            blockedEventsMap.putIfAbsent(checkpointId, new LinkedList<>());

Review Comment:
   Would it be more readable to do `put()` and throw exception if 
`blockedEventsMap()` already contains the given `checkpointId`?



-- 
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