zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rakeshadr <...@git.apache.org>
Subject [GitHub] zookeeper pull request #239: ZOOKEEPER-2762: Cleanup findbug warnings in bra...
Date Mon, 22 May 2017 09:07:57 GMT
Github user rakeshadr commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/239#discussion_r117696607
  
    --- Diff: src/java/test/config/findbugsExcludeFile.xml ---
    @@ -90,6 +90,16 @@
          <Bug code="IS"/>
       </Match>
       <Match>
    +    <Class name="org.apache.zookeeper.server.quorum.Leader"/>
    +    <Method name="lead"/>
    --- End diff --
    
    Following are the variables, reported for MultiThreadedCorrectness warnings.
    ```
    QuorumPeer.tick
    FastLeaderElection.logicalclock
    AuthFastLeaderElection.logicalclock
    ```
    
    How about using `AtomicLong & AtomicLong` instead of excluding. Please refer branch-3.5
or trunk code as a reference.
    
    ```
    AtomicLong logicalclock = new AtomicLong(); /* Election instance */
    AtomicInteger tick = new AtomicInteger();
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message