zookeeper-dev mailing list archives

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

    https://github.com/apache/zookeeper/pull/628#discussion_r220765363
  
    --- 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 --
    
    I was allowing the `synced_observers` stat to distinguish between "this follower CAN support
observers, it just currently isn't" and "this follower CANNOT support observers (and so it
isn't)" by outputting a value of 0 or by being omitted respectively.
    
    It's a style choice. I'm not terribly attached to my current implementation and can change
it if you think outputting `synced_observers` of 0 in both cases is more straightforward.


---

Mime
View raw message