Github user jiajunwang commented on a diff in the pull request:
https://github.com/apache/helix/pull/297#discussion_r251134740
--- Diff:
helix-core/src/main/java/org/apache/helix/manager/zk/zookeeper/ZkConnection.java
---
@@ -84,6 +83,25 @@ public void close() throws InterruptedException {
}
}
+ protected void reconnect(Watcher watcher) throws InterruptedException {
+ _zookeeperLock.lock();
+ try {
+ if (_zk == null) {
+ throw new IllegalStateException("zk client has not been connected
or already been closed");
+ }
+ ZooKeeper prevZk = _zk;
+ try {
+ LOG.debug("Creating new ZookKeeper instance to reconnect to " +
_servers + ".");
--- End diff --
We already have state change logs. In addition, if the reconnect fails, we
will print warning log in the ZkClient. Here, to be consistent with other
ZkConnection, I think it's better that we keep it a debug log.
---