You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "masteryhx (via GitHub)" <gi...@apache.org> on 2023/06/25 07:25:45 UTC
[GitHub] [flink] masteryhx commented on a diff in pull request #22744: [FLINK-29802][state] Changelog supports native savepoint
masteryhx commented on code in PR #22744:
URL: https://github.com/apache/flink/pull/22744#discussion_r1241073286
##########
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:
Yes.
IIUC, Savepoint should use its own `CheckpointStreamFactory` which is consistent with all state backends as you could see `initializeLocationForSavepoint`, right ?
--
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-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org