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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to