cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [6/6] git commit: make ITC to handle versioning using BCA patch by Vijay; reviewed by Brandon Williams for CASSANDRA-4098
Date Fri, 30 Mar 2012 14:50:08 GMT
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
Commit: b85d44a25bec8355a86288376eca17021b9793f2
Parents: b0dfb4c
Author: Vijay Parthasarathy <vijay2win@gmail.com>
Authored: Thu Mar 29 16:29:07 2012 -0700
Committer: Vijay Parthasarathy <vijay2win@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);
             }
             


Mime
View raw message