You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by GitBox <gi...@apache.org> on 2022/03/31 19:32:31 UTC

[GitHub] [flink-kubernetes-operator] gyfora commented on a change in pull request #139: [FLINK-26893] Validate checkpoint config with last-state upgrade mode

gyfora commented on a change in pull request #139:
URL: https://github.com/apache/flink-kubernetes-operator/pull/139#discussion_r839952791



##########
File path: flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/validation/DefaultDeploymentValidator.java
##########
@@ -145,10 +146,29 @@
         }
 
         Configuration configuration = Configuration.fromMap(confMap);
-        if (job.getUpgradeMode() == UpgradeMode.LAST_STATE
-                && !FlinkUtils.isKubernetesHAActivated(configuration)) {
-            return Optional.of(
-                    "Job could not be upgraded with last-state while Kubernetes HA disabled");
+        if (job.getUpgradeMode() == UpgradeMode.LAST_STATE) {
+            if (!FlinkUtils.isKubernetesHAActivated(configuration)) {
+                return Optional.of(
+                        "Job could not be upgraded with last-state while Kubernetes HA disabled");
+            } else if (!configuration.containsKey(
+                            ExecutionCheckpointingOptions.CHECKPOINTING_INTERVAL.key())
+                    || configuration
+                                    .get(ExecutionCheckpointingOptions.CHECKPOINTING_INTERVAL)
+                                    .compareTo(
+                                            configuration.get(
+                                                    ExecutionCheckpointingOptions
+                                                            .MIN_PAUSE_BETWEEN_CHECKPOINTS))

Review comment:
       I dont really understant the point of this check. Is this necessary?




-- 
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: commits-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org