zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanm <...@git.apache.org>
Subject [GitHub] zookeeper pull request #628: ZOOKEEPER-3140: Allow Followers to host Observe...
Date Thu, 20 Sep 2018 05:16:17 GMT
Github user hanm commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/628#discussion_r219036460
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/Follower.java ---
    @@ -196,6 +224,10 @@ protected long getLastQueued() {
             return lastQueued;
         }
     
    +    public Integer getSyncedObserverSize() {
    +        return  om == null ? null : om.getNumActiveObservers();
    --- End diff --
    
    should we just return 0 if om is null? This would simplify caller code like https://github.com/apache/zookeeper/pull/628/files#diff-8c1d5f61ac728fda8f4b706ae4277364R369
    
    Is there a need to differentiate between null om and none-null om with zero number of
active observers?


---

Mime
View raw message