ctubbsii commented on code in PR #2737:
URL: https://github.com/apache/accumulo/pull/2737#discussion_r882694583


##########
server/base/src/main/java/org/apache/accumulo/server/conf/codec/VersionedProperties.java:
##########
@@ -106,10 +107,15 @@ public VersionedProperties(final int dataVersion, final 
Instant timestamp,
    * value should be used on data writes as the expected version. If the data 
write fails do to an
    * unexpected version, it signals that the node version has changed since 
the instance was
    * instantiated and encoded.
+   * <p>
+   * Implementation note: The data version is stored and returned is an 
unsigned 32-bit integer
+   * value. Internally, ZooKeeper stores the value as a 32-bit signed value 
that can roll-over and
+   * become negative. The can break applications that rely on the value to 
always increase. This
+   * class ensures that the long returned will increase and will not be 
negative.

Review Comment:
   What applications would rely on this always increasing?
   
   Doing this will make it never be negative, but it could still roll over and 
start back at zero, so it's not guaranteed to always increase. Right?



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