You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/06/28 23:16:41 UTC
[GitHub] [zookeeper] hanm commented on a change in pull request #958:
ZOOKEEPER-1523: Better logging during instance loading/syncing
hanm commented on a change in pull request #958: ZOOKEEPER-1523: Better logging during instance loading/syncing
URL: https://github.com/apache/zookeeper/pull/958#discussion_r298772062
##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java
##########
@@ -416,6 +416,22 @@ public void checkAddressDuplicate(QuorumServer s) throws BadArgumentsException {
LOOKING, FOLLOWING, LEADING, OBSERVING;
}
+ /**
+ * (Used for monitoring) When peer is in non-LOOKING phase, this shows the
+ * current phase of Zab protocol that peer is running.
+ */
+ public enum ZabState {
+ NONE, DISCOVERY, SYNCHRONIZATION, BROADCAST;
Review comment:
Do we need 'NONE' here? As the comment said, only ZAB is only relevant for non-looking phase, but later in the code we are setting the state to 'NONE' for non looking peer. I guess we could:
* Update comment saying 'NONE' maps to the looking phase
Or
* Remove 'NONE' from the state (which might be more consistent with traditional ZAB literatures), and don't set the zab state for looking peers.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services