cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [2/7] cassandra git commit: Cleanup MessagingService socket after catching Throwable (ninja #11841)
Date Wed, 31 Aug 2016 21:08:12 GMT
Cleanup MessagingService socket after catching Throwable (ninja #11841)


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/77924b37
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/77924b37
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/77924b37

Branch: refs/heads/cassandra-2.2
Commit: 77924b37c9bd28af8bfdc77edc9c7d6717c8085d
Parents: b39d984
Author: Paulo Motta <pauloricardomg@gmail.com>
Authored: Mon Aug 15 17:19:38 2016 -0300
Committer: Yuki Morishita <yukim@apache.org>
Committed: Wed Aug 31 16:04:32 2016 -0500

----------------------------------------------------------------------
 .../org/apache/cassandra/net/IncomingStreamingConnection.java   | 5 ++---
 src/java/org/apache/cassandra/net/MessagingService.java         | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/77924b37/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java b/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java
index ab262c7..f7dc240 100644
--- a/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java
+++ b/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java
@@ -74,10 +74,9 @@ public class IncomingStreamingConnection extends Thread implements Closeable
             // parallelize said streams and the socket is blocking, so we might deadlock.
             StreamResultFuture.initReceivingSide(init.sessionIndex, init.planId, init.description,
init.from, this, init.isForOutgoing, version, init.keepSSTableLevel, init.isIncremental);
         }
-        catch (IOException e)
+        catch (Throwable t)
         {
-            logger.error(String.format("IOException while reading from socket from %s, closing:
%s",
-                                       socket.getRemoteSocketAddress(), e));
+            logger.error("Error while reading from socket from {}.", socket.getRemoteSocketAddress(),
t);
             close();
         }
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/77924b37/src/java/org/apache/cassandra/net/MessagingService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/MessagingService.java b/src/java/org/apache/cassandra/net/MessagingService.java
index 8c8a333..fb0c9ca 100644
--- a/src/java/org/apache/cassandra/net/MessagingService.java
+++ b/src/java/org/apache/cassandra/net/MessagingService.java
@@ -1034,9 +1034,9 @@ public final class MessagingService implements MessagingServiceMBean
                     logger.error("SSL handshake error for inbound connection from " + socket,
e);
                     FileUtils.closeQuietly(socket);
                 }
-                catch (IOException e)
+                catch (Throwable t)
                 {
-                    logger.trace("Error reading the socket " + socket, e);
+                    logger.trace("Error reading the socket {}", socket, t);
                     FileUtils.closeQuietly(socket);
                 }
             }


Mime
View raw message