rkhachatryan commented on code in PR #19448: URL: https://github.com/apache/flink/pull/19448#discussion_r873872760
########## flink-runtime/src/main/java/org/apache/flink/runtime/state/SharedStateRegistryImpl.java: ########## @@ -137,12 +150,26 @@ public StreamStateHandle registerReference( return entry.stateHandle; } + @Override + public void registerCompletedCheckpoint(CompletedCheckpoint checkpoint) { + synchronized (registeredCheckpoints) { + LOG.trace("Register checkpoint {}.", checkpoint.getCheckpointID()); + registeredCheckpoints.add(checkpoint); + } + } + + @Override + public void setPostCleanAction(Runnable postCleanAction) { + this.postCleanAction = postCleanAction; Review Comment: I'd prefer this action to be passed as an argument to `unregisterUnusedState` rather than having it as a mutable field, because: 1. on shutdown, it should not be called, right? with an argument, it's easier to pass a no-op callback 2. it's easy to forget to call this setter and more difficult to understand **when** is it called -- 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