cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject cassandra git commit: Log endpoint and port associated with streaming operation
Date Wed, 30 Mar 2016 19:49:43 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk db68ac9fd -> 7f6d70d70


Log endpoint and port associated with streaming operation

patch by Kaide Mu; reviewed by Paulo Motta for CASSANDRA-8777


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

Branch: refs/heads/trunk
Commit: 7f6d70d707e672baa0b43416350fe843c7f2fc67
Parents: db68ac9
Author: Kaide Mu <kaide.mu@gmail.com>
Authored: Tue Mar 29 02:48:55 2016 +0200
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Mar 30 20:49:34 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                    | 1 +
 src/java/org/apache/cassandra/streaming/ConnectionHandler.java | 2 +-
 src/java/org/apache/cassandra/streaming/StreamSession.java     | 5 ++++-
 3 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7f6d70d7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4650cf6..af3167c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.6
+ * Log endpoint and port associated with streaming operation (CASSANDRA-8777)
  * Print sensible units for all log messages (CASSANDRA-9692)
  * Upgrade Netty to version 4.0.34 (CASSANDRA-11096)
  * Break the CQL grammar into separate Parser and Lexer (CASSANDRA-11372)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7f6d70d7/src/java/org/apache/cassandra/streaming/ConnectionHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/ConnectionHandler.java b/src/java/org/apache/cassandra/streaming/ConnectionHandler.java
index d4662c7..960b531 100644
--- a/src/java/org/apache/cassandra/streaming/ConnectionHandler.java
+++ b/src/java/org/apache/cassandra/streaming/ConnectionHandler.java
@@ -206,7 +206,7 @@ public class ConnectionHandler
             this.socket = socket;
             this.protocolVersion = protocolVersion;
 
-            new Thread(this, name() + "-" + session.peer).start();
+            new Thread(this, name() + "-" + socket.getRemoteSocketAddress()).start();
         }
 
         public ListenableFuture<?> close()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7f6d70d7/src/java/org/apache/cassandra/streaming/StreamSession.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamSession.java b/src/java/org/apache/cassandra/streaming/StreamSession.java
index 39e12d4..0a04bd9 100644
--- a/src/java/org/apache/cassandra/streaming/StreamSession.java
+++ b/src/java/org/apache/cassandra/streaming/StreamSession.java
@@ -516,7 +516,10 @@ public class StreamSession implements IEndpointStateChangeSubscriber
      */
     public void onError(Throwable e)
     {
-        logger.error("[Stream #{}] Streaming error occurred", planId(), e);
+        logger.error("[Stream #{}] Streaming error occurred on session with peer {}{}", planId(),
+                                                                                        peer.getHostAddress(),
+                                                                                        peer.equals(connecting)
? "" : " through " + connecting.getHostAddress(),
+                                                                                        e);
         // send session failure message
         if (handler.isOutgoingConnected())
             handler.sendMessage(new SessionFailedMessage());


Mime
View raw message