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

    https://github.com/apache/zookeeper/pull/584#discussion_r205959572
  
    --- Diff: src/java/main/org/apache/zookeeper/server/DataTree.java ---
    @@ -478,7 +478,10 @@ public void createNode(final String path, byte data[], 
List<ACL> acl,
                     HashSet<String> list = ephemerals.get(ephemeralOwner);
                     if (list == null) {
                         list = new HashSet<String>();
    -                    ephemerals.put(ephemeralOwner, list);
    +                    HashSet<String> _list;
    --- End diff --
    
    we need synchronization to prevent znode changes while the znode is being 
snapshot to disk, but for request processing there is only a single thread that 
does mutations and mutations don't happen while read requests are being 
processed.


---

Reply via email to