cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/3] git commit: Record the real messaging version in all cases in OutboundTcpConnection
Date Tue, 07 Oct 2014 15:43:51 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 071b5f832 -> 9873960f3


Record the real messaging version in all cases in OutboundTcpConnection

patch by Aleksey Yeschenko; reviewed by Piotr Kołaczkowski for
CASSANDRA-8057


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

Branch: refs/heads/cassandra-2.1
Commit: f5a432147178ca22d7b6c5e810c12df70895c5b0
Parents: df046df
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Tue Oct 7 18:33:31 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Oct 7 18:33:31 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                                  | 2 ++
 src/java/org/apache/cassandra/net/OutboundTcpConnection.java | 7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a43214/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c811ebf..a249d83 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.11:
+ * Record the real messaging version in all cases in OutboundTcpConnection
+   (CASSANDRA-8057)
  * SSL does not work in cassandra-cli (CASSANDRA-7899)
  * Fix potential exception when using ReversedType in DynamicCompositeType
    (CASSANDRA-7898)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a43214/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnection.java b/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
index 8b8872b..c1de563 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
@@ -334,10 +334,14 @@ public class OutboundTcpConnection extends Thread
                     disconnect();
                     continue;
                 }
+                else
+                {
+                    MessagingService.instance().setVersion(poolReference.endPoint(), maxTargetVersion);
+                }
+
                 if (targetVersion > maxTargetVersion)
                 {
                     logger.debug("Target max version is {}; will reconnect with that version",
maxTargetVersion);
-                    MessagingService.instance().setVersion(poolReference.endPoint(), maxTargetVersion);
                     disconnect();
                     return false;
                 }
@@ -346,7 +350,6 @@ public class OutboundTcpConnection extends Thread
                 {
                     logger.trace("Detected higher max version {} (using {}); will reconnect
when queued messages are done",
                                  maxTargetVersion, targetVersion);
-                    MessagingService.instance().setVersion(poolReference.endPoint(), Math.min(MessagingService.current_version,
maxTargetVersion));
                     softCloseSocket();
                 }
 


Mime
View raw message