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

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/manager/zk/zookeeper/ZkClient.java
 ##########
 @@ -1278,29 +1279,28 @@ private void fireDataChangedEvents(final String path, 
Set<IZkDataListenerEntry>
             + listener.getDataListener() + " prefetch data: " + 
listener.isPrefetchData()) {
           @Override
           public void run() throws Exception {
-            // Reinstall watch before listener callbacks to check the znode 
status
             if (!pathStatRecord.pathChecked()) {
-              pathStatRecord.recordPathStat(getStat(path, true), 
notificationTime);
+              pathStatRecord.recordPathStat(getStat(path, pathExists), 
notificationTime);
             }
-            if (!pathStatRecord.pathExists()) {
-              // no znode found at the path, trigger data deleted handler.
+            if (!pathExists) {
 
 Review comment:
   How about let us keep the old code. The thing is that later if people 
looking at the change, it would take some time to figure out there is not 
really logical change here. 
   
   This is more of a beautification work. This may look better, but for fix, 
can be confusing.

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