rkhachatryan commented on code in PR #22744:
URL: https://github.com/apache/flink/pull/22744#discussion_r1261378225


##########
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogKeyedStateBackend.java:
##########
@@ -375,6 +378,49 @@ public RunnableFuture<SnapshotResult<KeyedStateHandle>> 
snapshot(
             @Nonnull CheckpointStreamFactory streamFactory,
             @Nonnull CheckpointOptions checkpointOptions)
             throws Exception {
+
+        if (checkpointOptions.getCheckpointType().isSavepoint()) {
+            SnapshotType.SharingFilesStrategy sharingFilesStrategy =
+                    
checkpointOptions.getCheckpointType().getSharingFilesStrategy();
+            if (sharingFilesStrategy == 
SnapshotType.SharingFilesStrategy.NO_SHARING) {
+                // For NO_SHARING native savepoint, trigger delegated one
+                RunnableFuture<SnapshotResult<KeyedStateHandle>> 
delegatedSnapshotResult =
+                        keyedStateBackend.snapshot(
+                                checkpointId, timestamp, streamFactory, 
checkpointOptions);

Review Comment:
   I didn't dig into the backend + local recovery code, but I think that would 
be safer (checkpoint ID received by delegated backend would be monotonically 
increasing).
   WDYT?



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

Reply via email to