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

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/manager/zk/zookeeper/ZkClient.java
 ##########
 @@ -145,32 +145,28 @@ public int hashCode() {
 
   private class ZkPathStatRecord {
     private final String _path;
-    private Stat _stat = null;
-    private boolean _checked = false;
+    private AtomicBoolean _isChecked = new AtomicBoolean(false);
 
 Review comment:
   @pkuwm I agree it's not necessary (my understanding of this code currently 
involves no multi-threading; To make it thread-safe with a simple atomic 
boolean is merely a simple try. 
   @jiajunwang @pkuwm The latest updates involve little changes on the existing 
code, it's no longer needed plus I don't really want to improve (refactor) the 
existing ones :)

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