mateczagany commented on code in PR #821: URL: https://github.com/apache/flink-kubernetes-operator/pull/821#discussion_r1668364184
########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/deployment/AbstractJobReconciler.java: ########## @@ -266,19 +304,31 @@ protected void restoreJob( Optional<String> savepointOpt = Optional.empty(); if (spec.getJob().getUpgradeMode() != UpgradeMode.STATELESS) { - savepointOpt = - Optional.ofNullable( - ctx.getResource() - .getStatus() - .getJobStatus() - .getSavepointInfo() - .getLastSavepoint()) - .flatMap(s -> Optional.ofNullable(s.getLocation())); + if (FlinkStateSnapshotUtils.shouldCreateSnapshotResource( + ctx.getOperatorConfig(), deployConfig)) { + savepointOpt = getLatestSavepointPathFromFlinkStateSnapshots(ctx); + } else { + savepointOpt = + Optional.ofNullable( + ctx.getResource() + .getStatus() + .getJobStatus() + .getSavepointInfo() + .getLastSavepoint()) + .flatMap(s -> Optional.ofNullable(s.getLocation())); Review Comment: Okay, I am definitely happy with this plan, I will push a commit soon: - the new field will be updated on upgrade, stop-with-savepoint and when the job becomes terminal - the field won't be set during manual and periodic snapshots (in contrast to how it worked so far) - savepoint path in `AbstractJobReconciler#restoreJob()` will be set to this field - `lastSavepoint` will still be used for periodic and manual savepoints if `FlinkStateSnapshot` is disabled. This will be deprecated. -- 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