Myasuka commented on a change in pull request #8693:
URL: https://github.com/apache/flink/pull/8693#discussion_r425831503



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -182,7 +181,7 @@
        protected final TimerService timerService;
 
        /** The currently active background materialization threads. */
-       private final CloseableRegistry cancelables = new CloseableRegistry();
+       private final AsyncCheckpointRunnableRegistry cancelables = new 
AsyncCheckpointRunnableRegistry();

Review comment:
       Actually, current `AsyncCheckpointRunnableRegistry` is a wrapper of 
`closeableRegistry` and ` Map<Long, AsyncCheckpointRunnable> checkpoints`.
   And if we do not use a wrapper but with two separate `closeableRegistry` and 
`checkpoints`,  the `AsyncCheckpointRunnable` would register itself to 
`closeableRegistry` and put itself with checkpoint id to `checkpoints` when 
begin async phase. 
   Once it reach the finally phase of the runnable, it will remove from the 
`checkpoints` and then unregister from `closeableRegistry`. Actually, I cannot 
see any real difference compared with current `AsyncCheckpointRunnableRegistry`.
   Perhaps the name of `AsyncCheckpointRunnableRegistry` could easily mislead 
developers? And a name like wrapper is better?




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