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



##########
File path: helix-core/src/main/java/org/apache/helix/HelixManager.java
##########
@@ -419,6 +419,17 @@ void 
addExternalViewChangeListener(org.apache.helix.ExternalViewChangeListener l
    */
   Long getSessionStartTime();
 
+  /**
+   * Checks whether the cluster manager is leader and returns the session ID 
associated to the
+   * connection of cluster data store, if and only if it is leader.
+   *
+   * @return {@code String} session ID is a valid string if the cluster 
manager is leader.
+   * Otherwise, returns null.
+   */
+  default String getSessionIdIfLead() {

Review comment:
       If you think my previous suggestion about the SessionAwareHelixManager 
interface is too much, then please still keep the Optional<String> 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]

Reply via email to