jiajunwang commented on a change in pull request #1066:
URL: https://github.com/apache/helix/pull/1066#discussion_r438441959



##########
File path: 
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
##########
@@ -901,6 +904,11 @@ public void addPreConnectCallback(PreConnectCallback 
callback) {
 
   @Override
   public boolean isLeader() {
+    return isInstanceLeader(null);
+  }
+
+  @Override
+  public boolean isInstanceLeader(InstanceLeaderSession instanceLeaderSession) 
{

Review comment:
       As we discussed,
   1. make it private if not used anywhere else.
   2. make it getSessionIdIfLeader() which returns an Optional object if the 
node is leader.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to