Github user maoling commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/584#discussion_r205961633 --- 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; + if ((_list = ephemerals.putIfAbsent(ephemeralOwner, list)) != null) { + list = _list; + } } synchronized (list) { --- End diff -- @anmolnar I will test it with that unit test , using a 'threadpool' and create 1000000 nodes to reproduce what I guessã I wish I was wrong,but if i'm right ,you need to watch Breaking Bad series (smirk).
---