Updated Branches: refs/heads/trunk f0ea699e6 -> 3f7c7323b
make ITC to handle versioning using BCA patch by Vijay; reviewed by Brandon Williams for CASSANDRA-4098 Conflicts: src/java/org/apache/cassandra/net/IncomingTcpConnection.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3f7c7323 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3f7c7323 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3f7c7323 Branch: refs/heads/trunk Commit: 3f7c7323b40e69fd6112735e922a298ed516df0e Parents: f0ea699 Author: Vijay Parthasarathy <vijay2...@gmail.com> Authored: Thu Mar 29 16:48:35 2012 -0700 Committer: Vijay Parthasarathy <vijay2...@gmail.com> Committed: Thu Mar 29 16:48:35 2012 -0700 ---------------------------------------------------------------------- .../cassandra/net/IncomingTcpConnection.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f7c7323/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 dc8a698..d7a3de4 100644 --- a/src/java/org/apache/cassandra/net/IncomingTcpConnection.java +++ b/src/java/org/apache/cassandra/net/IncomingTcpConnection.java @@ -36,13 +36,12 @@ public class IncomingTcpConnection extends Thread private static final int CHUNK_SIZE = 1024 * 1024; private final Socket socket; - public final InetAddress from; + public InetAddress from; public IncomingTcpConnection(Socket socket) { assert socket != null; this.socket = socket; - this.from = socket.getInetAddress(); // maximize chance of this not being nulled by disconnect } /** @@ -88,6 +87,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.current_version) { // save the endpoint so gossip will reconnect to it @@ -96,7 +96,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); }