Myasuka commented on code in PR #23764:
URL: https://github.com/apache/flink/pull/23764#discussion_r1400535656


##########
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/highavailability/KubernetesLeaderElectionHaServices.java:
##########
@@ -202,11 +199,7 @@ public void internalCleanup() throws Exception {
             exception = e;
         }
 
-        kubeClient
-                .deleteConfigMapsByLabels(
-                        KubernetesUtils.getConfigMapLabels(
-                                clusterId, 
LABEL_CONFIGMAP_TYPE_HIGH_AVAILABILITY))
-                .get();

Review Comment:
   For the code itself, yes, this PR changed the logic. However, for the 
internal of Flink, we do not change the behavior, and I think current change is 
the correct thing.
   
   After each job finished, Flink will clean up job related data (such as 
checkpoint id counter) on 
[Dispatcher#removeJob](https://github.com/apache/flink/blob/278504a2787a154faf6f6401028d4bbadafbba0a/flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java#L1258),
 and once the cluster shutdown, it will then clean the cluster related 
configmap (such as HA related leader) on 
[ClusterEntrypoint#stopClusterServices](https://github.com/apache/flink/blob/278504a2787a154faf6f6401028d4bbadafbba0a/flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/ClusterEntrypoint.java#L502).
   
   For `KubernetesLeaderElectionHaServices`, it should only clean cluster 
related configs on `#internalCleanup` instead of cleanning the configmaps via 
labels.
   
   



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