jiajunwang commented on a change in pull request #924: Fix ZkHelixPropertyStore 
loses Zookeeper notification issue
URL: https://github.com/apache/helix/pull/924#discussion_r405878950
 
 

 ##########
 File path: 
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java
 ##########
 @@ -1101,7 +1104,10 @@ protected void processStateChanged(WatchedEvent event) {
         fireAllEvents();
       }
     } else if (event.getState() == KeeperState.Expired) {
-      reconnectOnExpiring();
+      _isNewSessionEventFired = false;
+      if (isManagingZkConnection()) {
 
 Review comment:
   Yeah, but it is a good practice to check closer to where the real business 
logic exists.
   
   One example could be, if in the future we want to call reconnectOnExpiring() 
somewhere else, we don't need to add one more check there.
   
   High-level, these 2 methods shall only be called for non-shared clients. But 
we don't have a way to block them for shared client implementation. So we just 
put the check inside, then they won't cause any more problems even if we want 
to do anything to change the zkclient.

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