zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1713317 - in /zookeeper/branches/branch-3.4: CHANGES.txt src/java/main/org/apache/zookeeper/ClientCnxn.java
Date Sun, 08 Nov 2015 23:11:34 GMT
Author: rgs
Date: Sun Nov  8 23:11:34 2015
New Revision: 1713317

URL: http://svn.apache.org/viewvc?rev=1713317&view=rev
Log:
ZOOKEEPER-2315: Change client connect zk service timeout log level from Info
to Warn level (Lin Yiqun via rgs)

Modified:
    zookeeper/branches/branch-3.4/CHANGES.txt
    zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxn.java

Modified: zookeeper/branches/branch-3.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/CHANGES.txt?rev=1713317&r1=1713316&r2=1713317&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.4/CHANGES.txt Sun Nov  8 23:11:34 2015
@@ -182,6 +182,9 @@ IMPROVEMENTS:
 
   ZOOKEEPER-2245: SimpleSysTest test cases fails (Arshad Mohammad via rakeshr)
 
+  ZOOKEEPER-2315: Change client connect zk service timeout log level from Info
+  to Warn level (Lin Yiqun via rgs)
+
 NEW FEATURES:
 
   ZOOKEEPER-2237 Port async multi to 3.4 branch (Ivan Kelly via rakeshr)

Modified: zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxn.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxn.java?rev=1713317&r1=1713316&r2=1713317&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxn.java (original)
+++ zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxn.java Sun Nov
 8 23:11:34 2015
@@ -1099,11 +1099,14 @@ public class ClientCnxn {
                     }
                     
                     if (to <= 0) {
-                        throw new SessionTimeoutException(
-                                "Client session timed out, have not heard from server in
"
-                                        + clientCnxnSocket.getIdleRecv() + "ms"
-                                        + " for sessionid 0x"
-                                        + Long.toHexString(sessionId));
+                        String warnInfo;
+                        warnInfo = "Client session timed out, have not heard from server
in "
+                            + clientCnxnSocket.getIdleRecv()
+                            + "ms"
+                            + " for sessionid 0x"
+                            + Long.toHexString(sessionId);
+                        LOG.warn(warnInfo);
+                        throw new SessionTimeoutException(warnInfo);
                     }
                     if (state.isConnected()) {
                     	//1000(1 second) is to prevent race condition missing to send the second
ping
@@ -1275,9 +1278,12 @@ public class ClientCnxn {
                         Watcher.Event.EventType.None,
                         Watcher.Event.KeeperState.Expired, null));
                 eventThread.queueEventOfDeath();
-                throw new SessionExpiredException(
-                        "Unable to reconnect to ZooKeeper service, session 0x"
-                                + Long.toHexString(sessionId) + " has expired");
+
+                String warnInfo;
+                warnInfo = "Unable to reconnect to ZooKeeper service, session 0x"
+                    + Long.toHexString(sessionId) + " has expired";
+                LOG.warn(warnInfo);
+                throw new SessionExpiredException(warnInfo);
             }
             if (!readOnly && isRO) {
                 LOG.error("Read/write client got connected to read-only server");



Mime
View raw message