zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] hanm commented on a change in pull request #958: ZOOKEEPER-1523: Better logging during instance loading/syncing
Date Fri, 28 Jun 2019 23:16:41 GMT
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_r298772136
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java
 ##########
 @@ -757,9 +775,30 @@ public synchronized void setPeerState(ServerState newState) {
         state = newState;
         if (newState == ServerState.LOOKING) {
             setLeaderAddressAndId(null, -1);
+            setZabState(ZabState.NONE);
+        } else {
+            LOG.info("Peer state changed: " + getDetailedPeerState());
         }
     }
 
+    public void setZabState(ZabState zabState) {
+        this.zabState.set(zabState);
+        LOG.info("Peer state changed: " + getDetailedPeerState());
 
 Review comment:
   nit: use parameterized logging (and for the subsequent log statements).

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

Mime
View raw message