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


##########
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:
   Thanks for the advice.
   I think it's better to let checkpoint id of delegated state backend increase 
monotonically.
   Updated.



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