Github user lvfangmin commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/632#discussion_r224841261
--- Diff:
zookeeper-server/src/main/java/org/apache/zookeeper/server/DataNode.java ---
@@ -37,6 +37,14 @@
*
*/
public class DataNode implements Record {
+
+ // the digest value of this node, calculated from path, data and stat
+ private long digest;
--- End diff --
It's a single thread read/write this value for now, so it doesn't matter,
but I agree it would be better to have it as a volatile in case we need to
visit this in different thread in the future, will change that.
---