fredia commented on code in PR #20217:
URL: https://github.com/apache/flink/pull/20217#discussion_r923190093


##########
flink-dstl/flink-dstl-dfs/src/main/java/org/apache/flink/changelog/fs/FsStateChangelogWriter.java:
##########
@@ -329,14 +343,28 @@ public void confirm(SequenceNumber from, SequenceNumber 
to) {
         uploaded.subMap(from, to).values().stream()
                 .map(UploadResult::getStreamStateHandle)
                 .forEach(changelogRegistry::stopTracking);
+
+        if (localRecoveryConfig.isLocalRecoveryEnabled()) {
+            LocalStateRegistry localStateRegistry =
+                    localRecoveryConfig
+                            .getLocalStateRegistry()
+                            
.orElseThrow(LocalRecoveryConfig.localRecoveryNotEnabled());
+
+            // transfer the control of localHandle to localStateRegistry.
+            for (UploadResult result : uploaded.subMap(from, to).values()) {
+                changelogRegistry.stopTracking(result.localStreamHandle);
+                localStateRegistry.register(result.localStreamHandle, 
checkpointId);
+            }
+            localStateRegistry.unRegister(checkpointId);

Review Comment:
   👍Right, we only retain local state for the last one checkpoint.



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