You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by hu...@apache.org on 2019/05/25 01:20:00 UTC

[helix] 26/44: Fix the log logic in HelixManager.isLeader().

This is an automated email from the ASF dual-hosted git repository.

hulee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git

commit 6000a0325bc8203c21e668c04d5e5eb797c42c2a
Author: Jiajun Wang <jj...@linkedin.com>
AuthorDate: Thu Apr 25 14:03:21 2019 -0700

    Fix the log logic in HelixManager.isLeader().
    
    The output is not correct when isLeader() is false.
    
    RB=1645218
    G=helix-reviewers
    A=jxue
    
    Signed-off-by: Hunter Lee <hu...@linkedin.com>
---
 .../src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
index 513ea27..8ebf338 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
@@ -879,9 +879,9 @@ public class ZKHelixManager implements HelixManager, IZkStateListener {
         LOG.warn(String
             .format("%s current session %s does not match leader session %s", warnLogPrefix,
                 _sessionId, sessionId));
+      } else {
+        LOG.warn(String.format("%s leader ZNode is null", warnLogPrefix));
       }
-      LOG.warn(String.format("%s leader ZNode is null", warnLogPrefix));
-
     } catch (Exception e) {
       LOG.warn(String.format("%s exception happen when session check", warnLogPrefix), e);
     }