sonatype-lift[bot] commented on code in PR #1859: URL: https://github.com/apache/zookeeper/pull/1859#discussion_r846598219
########## zookeeper-server/src/main/java/org/apache/zookeeper/server/watch/WatchManager.java: ########## @@ -305,13 +322,12 @@ public synchronized WatchesSummary getWatchesSummary() { @Override public void shutdown() { /* do nothing */ } - @Override - public int getRecursiveWatchQty() { - return watcherModeManager.getRecursiveQty(); + int getRecursiveWatchQty() { + return recursiveWatchQty; Review Comment: *THREAD_SAFETY_VIOLATION:* Read/Write race. Non-private method `WatchManager.getRecursiveWatchQty()` reads without synchronization from `this.recursiveWatchQty`. Potentially races with write in method `WatchManager.addWatch(...)`. Reporting because another access to the same memory occurs on a background thread, although this access may not. (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org