dawidwys commented on a change in pull request #18001:
URL: https://github.com/apache/flink/pull/18001#discussion_r765023080
##########
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. IMO, we could
even simply return `previous`. Not sure why we actually don't do it.
The intention was not to recreate the `SharedStateRegistry` if we have
`previous`, because the one in previous should already be populated with all of
the completed checkpoints. Populating the `SharedStateRegistry` turns out to be
an expensive operation that the user would prefer to omit.
--
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]