kaisun2000 commented on a change in pull request #1185:
URL: https://github.com/apache/helix/pull/1185#discussion_r465436425



##########
File path: 
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java
##########
@@ -215,13 +218,21 @@ protected ZkClient(IZkConnection zkConnection, int 
connectionTimeout, long opera
       throw new NullPointerException("Zookeeper connection is null!");
     }
 
+    _uid = UID.getAndIncrement();
+    if (LOG.isInfoEnabled()) {
+      LOG.info("ZkClient created with _uid {}, stacktrace {}", _uid, 
Thread.currentThread().getStackTrace());

Review comment:
       Basically, for a log from a thread, such as ZkClient event thread or 
asycn retry thread, you have the thread id in the log. grepping thread id, you 
will find the _uid, grepping the _uid, you see the context of where the 
zkclient is created, such from zkhelixmanager or whatever other Helix java api. 
This is basically also the technique used to track the watcher leakage. 
   
   The log would not be excessive as only one zkclient creation has 3 more 
lines.
   
   For now, let me change it to debug, if this is ok. We can discussed adding 
this thing to callbackhandler and zkclient later.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to