You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/05/26 13:57:02 UTC

[GitHub] [accumulo] ctubbsii commented on a diff in pull request #2737: Address ZooKeeper version rollover - #2281

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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org