i3wangyi commented on a change in pull request #688: Fix the watcher leakage 
issue
URL: https://github.com/apache/helix/pull/688#discussion_r376010329
 
 

 ##########
 File path: 
helix-core/src/test/java/org/apache/helix/manager/zk/client/TestHelixZkClient.java
 ##########
 @@ -163,6 +163,8 @@ public void handleDataDeleted(String s) {
       // expected to be here.
     }
 
+    // client B needs to re-install the data watch
+    sharedZkClientB.watchForData(TEST_PATH);
 
 Review comment:
   Your concern is valid! To think about it, actually, it is the reason why 
native zookeeper has 2 sets of path related watcher: exists type and data type. 
To make a distinction between two, IMO, we either create a new 
`subscribeXXXDataChange` method or add a parameter like 
`subscribeDataChange(xx, xx, boolean listenOnNonExistPath = True/False`. 
   
   What's your opinion? In fact, at the current stage,  do we have users listen 
on random paths? If not, I think we're creating problems for ourselves. 

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