From notifications-return-548-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Fri Jun 28 23:16:55 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 89D8418062B for ; Sat, 29 Jun 2019 01:16:55 +0200 (CEST) Received: (qmail 20947 invoked by uid 500); 28 Jun 2019 23:16:55 -0000 Mailing-List: contact notifications-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list notifications@zookeeper.apache.org Received: (qmail 20938 invoked by uid 99); 28 Jun 2019 23:16:54 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jun 2019 23:16:54 +0000 From: GitBox To: notifications@zookeeper.apache.org Subject: [GitHub] [zookeeper] hanm commented on a change in pull request #958: ZOOKEEPER-1523: Better logging during instance loading/syncing Message-ID: <156176381489.17396.916352575568142834.gitbox@gitbox.apache.org> Date: Fri, 28 Jun 2019 23:16:54 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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, 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