akalash commented on code in PR #19331:
URL: https://github.com/apache/flink/pull/19331#discussion_r843923588


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/SharedStateRegistryImpl.java:
##########
@@ -174,6 +181,20 @@ public void registerAll(
         }
     }
 
+    @Override
+    public void registerAllAfterRestored(CompletedCheckpoint checkpoint, 
RestoreMode mode) {

Review Comment:
   Perhaps, I wasn't fully correct in my comment. But I mean that 
`highestRetainCheckpointID` as field of `SharedStateRegistry` is ok. But 
instead of `SharedStateRegistry#registerAllAfterRestored(CompletedCheckpoint 
checkpoint, RestoreMode mode)` we can use following signature 
`registerAllAfterRestored(CompletedCheckpoint checkpoint, long 
retainCheckpointID)`. And inside  
`CompletedCheckpoint#registerSharedStatesAfterRestored` we can call 
`registerAllAfterRestored' with the current checkpoint id if the restore mode 
is not claim and with -1 otherwise.
   
   But I agree that it is a minor change and it is up to you. I just don't 
really sure that `SharedStateRegistryImpl`should know something about 
RestoreMode.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to