pkuwm commented on a change in pull request #642: Fix handleNewSession creating 
ephemeral node with expired session
URL: https://github.com/apache/helix/pull/642#discussion_r363125969
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManager.java
 ##########
 @@ -182,7 +200,7 @@ private void createLiveInstance() {
     do {
       retry = false;
       try {
-        _zkclient.createEphemeral(liveInstancePath, liveInstance.getRecord());
+        _zkclient.createEphemeral(liveInstancePath, liveInstance.getRecord(), 
sessionId);
         LOG.info("LiveInstance created, path: " + liveInstancePath + ", 
sessionId: " + liveInstance.getEphemeralOwner());
       } catch (ZkNodeExistsException e) {
 
 Review comment:
   If we don't throw exception and just return, createLiveInstance may be 
treated as success and so carryOverPreviousCurrentState and setupMsgHandler 
will run. So I would like to follow the original logic to throw an exception if 
the ephemeral creation fails. The helix exception would be handled by 
ZkEventThread's run method: log the event's running failure. 

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