XComp commented on PR #20590:
URL: https://github.com/apache/flink/pull/20590#issuecomment-1220477326

   @wangyang0918 thanks the change and sorry for reiterating over it. I should 
have investigated into "the other direction" already yesterday. I'm wondering 
whether we could make the `addEntry` call idempotent. Hence, the caller doesn't 
have to deal with it. We would just have to do a equality check on the content 
before throwing the `AlreadyExistException` in 
[KubernetesStateHandleStore:663](https://github.com/apache/flink/blob/master/flink-kubernetes/src/main/java/org/apache/flink/kubernetes/highavailability/KubernetesStateHandleStore.java#L663).
   
   FYI: The ZooKeeper implementation handles the very same problem around retry 
handling (see 
[ZooKeeper:185](https://github.com/apache/flink/blob/cda343349f5d2b080218b7fe1993794a5a16c272/flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java#L185))


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