xiangforever2014 commented on code in PR #24058: URL: https://github.com/apache/flink/pull/24058#discussion_r1464515517
########## flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/SavepointRestoreSettings.java: ########## @@ -163,14 +163,16 @@ public static SavepointRestoreSettings forPath( public static void toConfiguration( final SavepointRestoreSettings savepointRestoreSettings, final Configuration configuration) { - configuration.set( - SavepointConfigOptions.SAVEPOINT_IGNORE_UNCLAIMED_STATE, - savepointRestoreSettings.allowNonRestoredState()); - configuration.set( - SavepointConfigOptions.RESTORE_MODE, savepointRestoreSettings.getRestoreMode()); - final String savepointPath = savepointRestoreSettings.getRestorePath(); - if (savepointPath != null) { - configuration.setString(SavepointConfigOptions.SAVEPOINT_PATH, savepointPath); + if (!savepointRestoreSettings.equals(SavepointRestoreSettings.none())) { Review Comment: @masteryhx I agree with your suggestion, and let the caller decide to set the default savepoint restore settings to configuration. `RemoteStreamEnvironment` also has this problem, I have changed the related code too, and add unit testes to verify it. -- 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