zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolivelli <...@git.apache.org>
Subject [GitHub] zookeeper pull request #632: [ZOOKEEPER-3150] Add tree digest check and veri...
Date Sat, 06 Oct 2018 12:43:24 GMT
Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/632#discussion_r223181383
  
    --- Diff: zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java ---
    @@ -1521,4 +1562,179 @@ public boolean removeWatch(String path, WatcherType type, Watcher
watcher) {
         public ReferenceCountedACLCache getReferenceCountedAclCache() {
             return aclCache;
         }
    +
    +    /**
    +     * Add the digest to the historical list, and update the latest zxid digest.
    +     */
    +    private void logZxidDigest(long zxid, long digest) {
    +        ZxidDigest zxidDigest = new ZxidDigest(zxid, DigestCalculator.DIGEST_VERSION,
digest);
    +        lastProcessedZxidDigest = zxidDigest;
    +        if (zxidDigest.zxid % 128 == 0) {
    --- End diff --
    
    Can you explain this magic value '128' ? Maybe a comment will help.
    
    Maybe I am missing something


---

Mime
View raw message