yfxhust commented on a change in pull request #1235: ZOOKEEPER-3706:
ZooKeeper.close() would leak SendThread when the netw…
URL: https://github.com/apache/zookeeper/pull/1235#discussion_r373914530
##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
##########
@@ -782,6 +782,10 @@ void queueCallback(AsyncCallback cb, int rc, String path,
Object ctx) {
eventThread.queueCallback(cb, rc, path, ctx);
}
+ protected void onConnecting(InetSocketAddress addr) {
+ LOG.info("Connecting server {}.", addr);
+ }
+
Review comment:
Actually onConnecting() method is added to facilitate the test case.
onConnecting() is the unsafe point that is described in JIRA issue. We can
override this method to inject some actions in test case. The injected actions
make issue happen. If we don't have this method, it is difficult to construct a
test case to reproduce the issue.
Your suggestion of log changing is good for me. Accept it. I will change the
log to "Try to reconnect to server {}." Thanks for your comments.
----------------------------------------------------------------
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