zhijiangW commented on a change in pull request #13286:
URL: https://github.com/apache/flink/pull/13286#discussion_r480911091



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SubtaskCheckpointCoordinatorImpl.java
##########
@@ -366,11 +366,10 @@ private void registerAsyncCheckpointRunnable(long 
checkpointId, AsyncCheckpointR
                synchronized (lock) {
                        if (closed) {
                                LOG.debug("Cannot register Closeable, this 
subtaskCheckpointCoordinator is already closed. Closing argument.");
-                               final boolean running = 
asyncCheckpointRunnable.isRunning();
                                closeQuietly(asyncCheckpointRunnable);
                                checkState(
-                                       !running,

Review comment:
       In the past we might encounter unnecessary exception while 
`#registerAsyncCheckpointRunnable` and `AsyncCheckpointRunnable#close` execute 
concurrently. Now we only close the runnable quietly without throwing any 
exception for `closed` case.
   
   I agree with this fix, but do we have any existing ITCase for 
covering/verifying this change?




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


Reply via email to