cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject git commit: fix streaming for messaging change patch by yukim, reviewed by brandonwilliams for CASSANDRA-4360
Date Wed, 20 Jun 2012 19:16:18 GMT
Updated Branches:
  refs/heads/trunk 877a8cacc -> d59be21e8


fix streaming for messaging change patch by yukim, reviewed by brandonwilliams for CASSANDRA-4360


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

Branch: refs/heads/trunk
Commit: d59be21e8a936d5c893a67e8a3c98505739a7279
Parents: 877a8ca
Author: Yuki Morishita <yukim@apache.org>
Authored: Wed Jun 20 14:15:36 2012 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Wed Jun 20 14:15:36 2012 -0500

----------------------------------------------------------------------
 .../apache/cassandra/streaming/FileStreamTask.java |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d59be21e/src/java/org/apache/cassandra/streaming/FileStreamTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/FileStreamTask.java b/src/java/org/apache/cassandra/streaming/FileStreamTask.java
index 96a0064..b557573 100644
--- a/src/java/org/apache/cassandra/streaming/FileStreamTask.java
+++ b/src/java/org/apache/cassandra/streaming/FileStreamTask.java
@@ -185,14 +185,9 @@ public class FileStreamTask extends WrappedRunnable
     protected void receiveReply() throws IOException
     {
         MessagingService.validateMagic(input.readInt());
-        int msheader = input.readInt();
-        assert MessagingService.getBits(msheader, 3, 1) == 0 : "Stream received before stream
reply";
-        int version = MessagingService.getBits(msheader, 15, 8);
-
-        if (version <= MessagingService.VERSION_11)
-            input.readInt(); // Read total size
         String id = input.readUTF();
-        MessageIn message = MessageIn.read(input, version, id);
+        // since we reject streaming with different version, using current_version here is
fine
+        MessageIn message = MessageIn.read(input, MessagingService.current_version, id);
         assert message.verb == MessagingService.Verb.STREAM_REPLY : "Non-reply message received
on stream socket";
         handler.doVerb(message, id);
     }


Mime
View raw message