XComp commented on a change in pull request #19121: URL: https://github.com/apache/flink/pull/19121#discussion_r829130437
########## File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/highavailability/KubernetesStateHandleStore.java ########## @@ -496,12 +498,14 @@ public boolean releaseAndTryRemove(String key) throws Exception { Objects.requireNonNull(configMap.getData().remove(key)); } return Optional.of(configMap); + } else { + stateHandleDoesNotExist.set(true); } return Optional.empty(); }) .thenCompose( updated -> { - if (updated && stateHandleRefer.get() != null) { + if (stateHandleRefer.get() != null) { Review comment: That's a valid point. Even if we set the `stateHandleReferer` it could mean that the update did not happen and in that case, we don't want to discard the data. I will revert it -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org