Github user tumativ commented on the issue:
https://github.com/apache/zookeeper/pull/689
I realized that processing remaining watchers is not a good idea without
knowing the context of the shutdown. The shutdown contract itself is stop
processing. I have modified the JIRA description.
It targets below improvements.
- Notify the WatcherCleaner thread during shutdown if it is waiting for
dead watchers get the certain number(watcherCleanThreshold)
- Notify the threads who are waiting on totalDeadWatchers, this can happen
when pending watchers are reached maximum
-Stop taking incoming dead watcher and adding to deadWatchers even cleaner
thread is stopped.
---