pkuwm commented on a change in pull request #644: Add new interface
IZkStateListener to provide session aware handleNewSession for ZkHelixManager
URL: https://github.com/apache/helix/pull/644#discussion_r356231794
##########
File path:
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
##########
@@ -699,7 +699,7 @@ void createClient() throws Exception {
try {
_zkclient.waitUntilConnected(_connectionInitTimeout,
TimeUnit.MILLISECONDS);
handleStateChanged(KeeperState.SyncConnected);
- handleNewSession();
+ handleNewSession(getSessionId());
Review comment:
Here at the time `getSessionId()`, the value is actually null. We already
have `waitUntilConnected()` in `handleNewSession(sessionId)` and
`waitUntilConnected()` will update the session id. So my thought is, maybe we
can just replace this line
`_zkclient.waitUntilConnected(_connectionInitTimeout, TimeUnit.MILLISECONDS);`
with the private method `waitUntilConnected()`. This may look cleaner.
Anyway, I am going to just keep it in this PR, to make this PR a pure new
interface change and leave session expiry operation not changed. And I will put
the operation change in the next PR.
What do you think?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]