Github user kevinxu021 commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1427#discussion_r172737025
  
    --- 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);
    +            } catch (IOException e) {
    +                setSessionRecoverSuccessful(false);
    +                LOG.error("session expired and throw IOException while do 
reconnect: " + e.getMessage());
    --- End diff --
    
    Use 2 params API for log. If it doesn't matter for whatever the message is, 
it should be LOG.warn.


---

Reply via email to