Github user lvfangmin commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/632#discussion_r223538616 --- 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 -- I'll add the comment here, basically we want to only export the history of digest every 128 txns. It's a random number we picked, but not all random, in hex it's 80, which will print nicer when we dump the digest history.
---