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/30 08:10:41 UTC

[GitHub] [flink-kubernetes-operator] gyfora commented on a change in pull request #133: [FLINK-26916] Remove job graph from K8s HA ConfigMaps when shutting down cluster

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



##########
File path: flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/FlinkService.java
##########
@@ -202,14 +206,18 @@ public boolean isJobManagerPortReady(Configuration config) {
                     }
                     break;
                 case LAST_STATE:
-                    final String namespace = conf.getString(KubernetesConfigOptions.NAMESPACE);
                     FlinkUtils.deleteCluster(namespace, clusterId, kubernetesClient, false);
                     break;
                 default:
                     throw new RuntimeException("Unsupported upgrade mode " + upgradeMode);
             }
         }
-        FlinkUtils.waitForClusterShutdown(kubernetesClient, conf);
+        FlinkUtils.waitForClusterShutdown(kubernetesClient, namespace, clusterId);
+        if (HighAvailabilityMode.isHighAvailabilityModeActivated(conf)) {
+            // Delete the job graph in the HA ConfigMaps so that the newly changed job config(e.g.
+            // parallelism) could take effect
+            FlinkUtils.deleteJobGraphInKubernetesHA(clusterId, namespace, kubernetesClient);
+        }

Review comment:
       Wouldn't it be more safe to execute this logic before deployment? Technically we could have an error after shutting down the job but before deleting the jobgraph.




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