lei-xia commented on a change in pull request #1066:
URL: https://github.com/apache/helix/pull/1066#discussion_r436132217
##########
File path: helix-core/src/main/java/org/apache/helix/HelixManager.java
##########
@@ -425,6 +426,19 @@ void
addExternalViewChangeListener(org.apache.helix.ExternalViewChangeListener l
*/
boolean isLeader();
+ /**
+ * Checks if the cluster manager is leader and sets its ZK session in
+ * {@link ControllerLeaderSession}.
+ *
+ * @param controllerLeaderSession To include ZK session of the cluster
manager in return
+ *
+ * @return true if this is a controller and a leader of the cluster. Zk
session of the cluster
+ * manager is set in controllerLeaderSession
+ */
+ default boolean isLeader(ControllerLeaderSession controllerLeaderSession) {
Review comment:
This could be confusion because there is no "leader" concept for a Helix
manager. Leader only applies to a controller instance, but HelixManager is a
broader concept here.
----------------------------------------------------------------
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]