zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lvfangmin <...@git.apache.org>
Subject [GitHub] zookeeper pull request #689: ZOOKEEPER-3183:Notifying the WatcherCleaner thr...
Date Mon, 19 Nov 2018 05:03:31 GMT
Github user lvfangmin commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/689#discussion_r234494972
  
    --- Diff: zookeeper-server/src/main/java/org/apache/zookeeper/server/watch/WatcherCleaner.java
---
    @@ -102,24 +104,24 @@ public void addDeadWatcher(int watcherBit) {
                     totalDeadWatchers.get() >= maxInProcessingDeadWatchers) {
                 try {
                     RATE_LOGGER.rateLimitLog("Waiting for dead watchers cleaning");
    -                synchronized(totalDeadWatchers) {
    -                    totalDeadWatchers.wait(100);
    -                }
    -            } catch (InterruptedException e) {
    -                LOG.info("Got interrupted while waiting for dead watches " +
    -                        "queue size");
    -            }
    -        }
    -        synchronized (this) {
    -            if (deadWatchers.add(watcherBit)) {
    -                totalDeadWatchers.incrementAndGet();
    -                if (deadWatchers.size() >= watcherCleanThreshold) {
    -                    synchronized (cleanEvent) {
    -                        cleanEvent.notifyAll();
    -                    }
    -                }
    -            }
    +				synchronized (processingCompletedEvent) {
    --- End diff --
    
    @tumativ looks like we still have some indent problem for this patch, can you help correct
those?


---

Mime
View raw message