helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hu...@apache.org
Subject [helix] 26/44: Fix the log logic in HelixManager.isLeader().
Date Sat, 25 May 2019 01:20:00 GMT
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 <jjwang@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 <hulee@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);
     }


Mime
View raw message