Github user lvfangmin commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/632#discussion_r224842221
  
    --- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java ---
    @@ -154,6 +160,26 @@
     
         private final ReferenceCountedACLCache aclCache = new 
ReferenceCountedACLCache();
     
    +    // The maximum number of tree digests that we will keep in our history
    +    public static final int DIGEST_LOG_LIMIT = 1024;
    +
    +    // Dump digest every 128 txns, in hex it's 80, which will make it 
easier 
    +    // to align and compare between servers.
    +    public static final int DIGEST_LOG_INTERVAL = 128;
    +
    +    // If this is not null, we are actively looking for a target zxid that 
we
    +    // want to validate the digest for
    +    private ZxidDigest digestFromLoadedSnapshot;
    +
    +    // The digest associated with the highest zxid in the data tree.
    +    private volatile ZxidDigest lastProcessedZxidDigest;
    +
    +    // Will be notified when digest mismatch event triggered.
    +    private List<DigestWatcher> digestWatchers = new ArrayList<>();
    --- End diff --
    
    We won't have concurrent modification here, this will be a static list and 
registered in the constructor of this class, so I don't expect to change this 
dynamically.
    



---

Reply via email to