cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [04/10] cassandra git commit: Handle runtime error case in CASSANDRA-9132
Date Tue, 26 May 2015 17:20:46 GMT
Handle runtime error case in CASSANDRA-9132


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

Branch: refs/heads/trunk
Commit: 2beb66e87e9a8115ab81f3274be0f29f4257641a
Parents: 5a571c6
Author: Yuki Morishita <yukim@apache.org>
Authored: Tue May 26 12:05:41 2015 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Tue May 26 12:05:41 2015 -0500

----------------------------------------------------------------------
 .../cassandra/streaming/messages/IncomingFileMessage.java    | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2beb66e8/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 5e0e087..99662d0 100644
--- a/src/java/org/apache/cassandra/streaming/messages/IncomingFileMessage.java
+++ b/src/java/org/apache/cassandra/streaming/messages/IncomingFileMessage.java
@@ -54,6 +54,14 @@ public class IncomingFileMessage extends StreamMessage
             }
             catch (Throwable e)
             {
+                // Throwable can be Runtime error containing IOException.
+                // In that case we don't want to retry.
+                Throwable cause = e;
+                while ((cause = cause.getCause()) != null)
+                {
+                   if (cause instanceof IOException)
+                       throw (IOException) cause;
+                }
                 // Otherwise, we can retry
                 session.doRetry(header, e);
                 return null;


Mime
View raw message