You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2012/03/30 16:47:40 UTC

[4/4] git commit: make ITC to handle versioning using BCA patch by Vijay; reviewed by Brandon Williams for CASSANDRA-4098

make ITC to handle versioning using BCA
patch by Vijay; reviewed by Brandon Williams for CASSANDRA-4098


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

Branch: refs/heads/cassandra-1.1.0
Commit: b85d44a25bec8355a86288376eca17021b9793f2
Parents: b0dfb4c
Author: Vijay Parthasarathy <vi...@gmail.com>
Authored: Thu Mar 29 16:29:07 2012 -0700
Committer: Vijay Parthasarathy <vi...@gmail.com>
Committed: Thu Mar 29 16:29:07 2012 -0700

----------------------------------------------------------------------
 .../cassandra/net/IncomingTcpConnection.java       |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b85d44a2/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/IncomingTcpConnection.java b/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
index ee44a1c..47ab39a 100644
--- a/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
+++ b/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
@@ -48,7 +48,6 @@ public class IncomingTcpConnection extends Thread
     {
         assert socket != null;
         this.socket = socket;
-        from = socket.getInetAddress(); // maximize chance of this not being nulled by disconnect
     }
 
     /**
@@ -94,6 +93,7 @@ public class IncomingTcpConnection extends Thread
             input = new DataInputStream(new BufferedInputStream(socket.getInputStream(), 4096));
             // Receive the first message to set the version.
             Message msg = receiveMessage(input, version);
+            from = msg.getFrom(); // why? see => CASSANDRA-4099
             if (version > MessagingService.version_)
             {
                 // save the endpoint so gossip will reconnect to it
@@ -102,7 +102,7 @@ public class IncomingTcpConnection extends Thread
             }
             else if (msg != null)
             {
-                Gossiper.instance.setVersion(msg.getFrom(), version);
+                Gossiper.instance.setVersion(from, version);
                 logger.debug("set version for {} to {}", from, version);
             }