mateczagany commented on code in PR #821:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/821#discussion_r1668650953


##########
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:
   I have added a commit that should cover these points, I have also resolved 
related conversations. The commit also adds support for `savepointTriggerNonce` 
and `checkpointTriggerNonce` with the new snapshot resources. I will also add 
unit tests for these later.



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