rkhachatryan commented on a change in pull request #18001:
URL: https://github.com/apache/flink/pull/18001#discussion_r765052650



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/nonha/embedded/EmbeddedHaServicesWithLeadershipControl.java
##########
@@ -36,16 +40,23 @@ public EmbeddedHaServicesWithLeadershipControl(Executor 
executor) {
         this(
                 executor,
                 new 
PerJobCheckpointRecoveryFactory<EmbeddedCompletedCheckpointStore>(
-                        (maxCheckpoints, previous) -> {
+                        (maxCheckpoints, previous, stateRegistryFactory, 
ioExecutor) -> {
+                            List<CompletedCheckpoint> checkpoints =
+                                    previous != null
+                                            ? previous.getAllCheckpoints()
+                                            : Collections.emptyList();
+                            SharedStateRegistry stateRegistry =

Review comment:
       > Just in terms of classes. In fact it is not recreated
   
   Sorry I don't get you: `EmbeddedCompletedCheckpointStore` object is 
recreated with `new` and it represents the store, doesn't it?
   The checkpoints from the old store **are** reused, but they are immutable; 
the registry, OTH could be closed, so I think it would be error-prone to reuse 
it.
   
   I think the intention is to not re-create the registry in 
`CheckpointCoordinator.restoreLatestCheckpointedStateInternal`;
   (currently, it re-uses the store but re-creates the registry).
   
   Btw, I see that `EmbeddedHaServicesWithLeadershipControl` is used only in 
tests.




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