tisonkun commented on code in PR #478:
URL: https://github.com/apache/curator/pull/478#discussion_r1624247043


##########
curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedValue.java:
##########
@@ -193,14 +199,13 @@ public boolean trySetValue(VersionedValue<byte[]> 
previous, byte[] newValue) thr
         return false;
     }
 
-    private void updateValue(int version, byte[] bytes) {
+    private void updateValue(long zxid, int version, byte[] bytes) {
         while (true) {
             VersionedValue<byte[]> current = currentValue.get();
-            if (current.getVersion() >= version) {
-                // A newer version was concurrently set.
+            if (current.getZxid() >= zxid) {

Review Comment:
   What if only one client here and it goes through the overflow bound?
   
   Said `current.getZxid() == MAX_VALUE` and `zxid == MIN_VALUE`, the update 
action will be skipped and the value will never updated.
   
   Or we have different assumption on zxid?



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