cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [1/6] cassandra git commit: Fix streaming hang when retrying
Date Fri, 01 May 2015 22:10:50 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 1e35fa4b5 -> a11bc7865
  refs/heads/cassandra-2.1 6d06f32a7 -> 0276c2aab
  refs/heads/trunk be6295ede -> bbc796dfd


Fix streaming hang when retrying

patch by yukim; reviewed by jmckenzie for CASSANDRA-9132


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

Branch: refs/heads/cassandra-2.0
Commit: a11bc78656dd4740960c0a1eb6265f910337a16b
Parents: 1e35fa4
Author: Yuki Morishita <yukim@apache.org>
Authored: Fri May 1 16:52:47 2015 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Fri May 1 16:52:47 2015 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 .../cassandra/streaming/messages/IncomingFileMessage.java     | 7 +++++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a11bc786/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2dabbf9..e9287ec 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -57,6 +57,7 @@
    (CASSANDRA-8808)
  * Fix MT mismatch between empty and GC-able data (CASSANDRA-8979)
  * Fix incorrect validation when snapshotting single table (CASSANDRA-8056)
+ * Fix streaming hang when retrying (CASSANDRA-9132)
 
 
 2.0.14

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a11bc786/src/java/org/apache/cassandra/streaming/messages/IncomingFileMessage.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/messages/IncomingFileMessage.java b/src/java/org/apache/cassandra/streaming/messages/IncomingFileMessage.java
index a403390..5e0e087 100644
--- a/src/java/org/apache/cassandra/streaming/messages/IncomingFileMessage.java
+++ b/src/java/org/apache/cassandra/streaming/messages/IncomingFileMessage.java
@@ -46,8 +46,15 @@ public class IncomingFileMessage extends StreamMessage
             {
                 return new IncomingFileMessage(reader.read(in), header);
             }
+            catch (IOException eof)
+            {
+                // Reading from remote failed(i.e. reached EOF before reading expected length
of data).
+                // This can be caused by network/node failure thus we are not retrying
+                throw eof;
+            }
             catch (Throwable e)
             {
+                // Otherwise, we can retry
                 session.doRetry(header, e);
                 return null;
             }


Mime
View raw message