zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #590: [ZOOKEEPER-1177] Add the memory optimized watch...
Date Wed, 05 Sep 2018 08:35:57 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/590#discussion_r215180602
  
    --- Diff: src/java/main/org/apache/zookeeper/server/watch/WatchManager.java ---
    @@ -46,15 +48,26 @@
         private final Map<Watcher, Set<String>> watch2Paths =
             new HashMap<Watcher, Set<String>>();
     
    -    synchronized int size(){
    +    @Override
    +    public synchronized int size(){
             int result = 0;
             for(Set<Watcher> watches : watchTable.values()) {
                 result += watches.size();
             }
             return result;
         }
     
    -    synchronized void addWatch(String path, Watcher watcher) {
    +    boolean isDeadWatcher(Watcher watcher) {
    --- End diff --
    
    Taking that into account and the jira fix version, this patch will definitely go into
3.5 as well.


---

Mime
View raw message