Github user lvfangmin commented on the issue: https://github.com/apache/zookeeper/pull/590 @anmolnar Thanks for reviewing, take your time. Here are the main differences between this version and the old one on the Jira: 1. use path to watchers map instead of watcher to paths to improve the performance of trigger watches, we need the lazily dead watcher clean up because of this (main change) 2. better and cleaner implementation, for example, added WatchManagerFactory to easily switch between different watch manager implementation 3. some perf improvement by using HashSet and BitSet to find a balance between memory usage and time complexity 4. fix the watcher leaking issue due to adding dead watcher (we can separate this out if we want to) 5. fix the NettyServerCnxn doesn't de-register itself from watcher manager when the cnxn closed (this is actually fixed recently in #612, so it's not necessary to do it here now) 6. added jmh micro benchmark
---