Hexiaoqiao commented on PR #478: URL: https://github.com/apache/curator/pull/478#issuecomment-1700658027
Some conclusion, a. zookeeper server side only add 1 for version when update znode. And it allows integer overflow. b. curator side can't be compatible with integer overflow because it compares old version and new version here and not consider the negative version number. https://github.com/apache/curator/blob/master/curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedValue.java#L196-L209 c. The issue will be triggered from user interface both SharedCount#trySetCount and SharedCount#start(). When znode version meet Integer.MIN_VALUE SharedCount will be never update because condition `current.getVersion() >= version` always true. d. While add condition `current.getVersion() >= version && version != Integer.MIN_VALUE`, this case could be resolved. And update znode as expected. -- 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]
