XComp commented on a change in pull request #19153:
URL: https://github.com/apache/flink/pull/19153#discussion_r830183013
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
##########
@@ -350,14 +350,48 @@ public KubernetesLeaderElector createLeaderElector(
@Override
public CompletableFuture<Void> deleteConfigMapsByLabels(Map<String,
String> labels) {
return CompletableFuture.runAsync(
- () ->
this.internalClient.configMaps().withLabels(labels).delete(),
+ () -> {
+ if
(!this.internalClient.configMaps().withLabels(labels).delete()) {
Review comment:
IMHO, if the exist check is expensive, we shouldn't do it and rather
rely on the implementation but add a comment in the
`FlinkKubeClient.deleteConfigMapsBy*` implementations. Doing the exist call
would just be more coherent with the actual contract of the interface provided
by the fabric8 client.
--
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]