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?
---