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

    https://github.com/apache/zookeeper/pull/689#discussion_r236098818
  
    --- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/watch/WatcherCleaner.java
 ---
    @@ -102,12 +103,13 @@ public void addDeadWatcher(int watcherBit) {
                     totalDeadWatchers.get() >= maxInProcessingDeadWatchers) {
                 try {
                     RATE_LOGGER.rateLimitLog("Waiting for dead watchers 
cleaning");
    -                synchronized(totalDeadWatchers) {
    -                    totalDeadWatchers.wait(100);
    +                synchronized(processingCompletedEvent) {
    +                    processingCompletedEvent.wait(100);
                     }
                 } catch (InterruptedException e) {
    -                LOG.info("Got interrupted while waiting for dead watches " 
+
    +                LOG.info("Got interrupted while waiting for dead watchers 
" +
    --- End diff --
    
    Ditto, watches are more accurate.


---

Reply via email to