zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lvfangmin <...@git.apache.org>
Subject [GitHub] zookeeper pull request #632: [ZOOKEEPER-3150] Add tree digest check and veri...
Date Fri, 12 Oct 2018 16:29:46 GMT
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.


---

Mime
View raw message