zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] lvfangmin commented on a change in pull request #632: [ZOOKEEPER-3150] Add tree digest check and verify data integrity when loading from disk
Date Sun, 28 Jul 2019 19:55:26 GMT
lvfangmin commented on a change in pull request #632: [ZOOKEEPER-3150] Add tree digest check
and verify data integrity when loading from disk
URL: https://github.com/apache/zookeeper/pull/632#discussion_r308015620
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java
 ##########
 @@ -159,6 +165,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 final List<DigestWatcher> digestWatchers = new ArrayList<>();
+
+    // The historical digests list.
+    private LinkedList<ZxidDigest> digestLog = new LinkedList<>();
 
 Review comment:
   The LinkedList.poll function is used on digestLog, which is not on List interface, that's
why using LinkedList type here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message