jiajunwang 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_r355696742
 
 

 ##########
 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:
   This is dangerous.
   
   _zkclient.waitUntilConnected(_connectionInitTimeout, TimeUnit.MILLISECONDS);
   handleStateChanged(KeeperState.SyncConnected);               
handleStateChanged(KeeperState.SyncConnected);
   // Session expired and re-created. So next, you are going to create a node 
with wrong session number.
   handleNewSession();          handleNewSession(getSessionId());
   
   Please lock the whole bock. Or we need to let waitUntilConnected return a 
session Id synchronizely.

----------------------------------------------------------------
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]

Reply via email to