Github user kevinxu021 commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1427#discussion_r172737467
--- Diff: dcs/src/main/java/org/trafodion/dcs/zookeeper/ZkClient.java ---
@@ -176,7 +208,19 @@ public ZooKeeper getZk() {
public void process(WatchedEvent event) {
if(event.getState() == Watcher.Event.KeeperState.SyncConnected)
{
connectedSignal.countDown();
- }
+ } else if (event.getState() ==
Watcher.Event.KeeperState.Expired) {
+ LOG.info("session expired. now rebuilding");
+ // session expired, may be never happending. but if it happen
there
+ // need to close old client and rebuild new client
+ try {
+ connect(true);
--- End diff --
In connect(...), I saw it was catch for zookeeper exception, how can get
exception here?
---