zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lvfangmin <...@git.apache.org>
Subject [GitHub] zookeeper issue #590: [ZOOKEEPER-1177] Add the memory optimized watch manage...
Date Wed, 08 Aug 2018 06:06:09 GMT
Github user lvfangmin commented on the issue:

    https://github.com/apache/zookeeper/pull/590
  
    @hanm the code complained by Findbug are all correct and expected:
    
    1. System.exit if create watch manager failed in DataTree
    It's using the factory to create the watch manager based on the class name, in case we
cannot initialize the class due to invalid classname, we have to exit.
    
    2. BitHashSet.elementCount not synchronized in iterator()
    It cannot guarantee thread safe during iteration inside this function, so it's marked
as non thread safe in the comment, and the caller needs to and is synchronizing it during
iterating.
    
    3. Synchronize on AtomicInteger
    In the code, we synchronize on it to do wait/notify, but not relying on the synchronization
to control the  AtomicInteger value update, so it's used correctly.


---

Mime
View raw message