cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mshu...@apache.org
Subject [34/50] [abbrv] cassandra git commit: Throw RuntimeException if starting transfer of already completed OutgoingFileMessage
Date Tue, 16 Aug 2016 22:42:35 GMT
Throw RuntimeException if starting transfer of already completed OutgoingFileMessage


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

Branch: refs/heads/cassandra-3.8
Commit: 88b3cfc3b6b4417a913a512b461897378b48c039
Parents: 315356c
Author: Paulo Motta <pauloricardomg@gmail.com>
Authored: Fri Aug 12 22:06:27 2016 -0300
Committer: Yuki Morishita <yukim@apache.org>
Committed: Mon Aug 15 10:09:36 2016 -0500

----------------------------------------------------------------------
 .../apache/cassandra/streaming/messages/OutgoingFileMessage.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/88b3cfc3/src/java/org/apache/cassandra/streaming/messages/OutgoingFileMessage.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/messages/OutgoingFileMessage.java b/src/java/org/apache/cassandra/streaming/messages/OutgoingFileMessage.java
index a88386e..30b79f8 100644
--- a/src/java/org/apache/cassandra/streaming/messages/OutgoingFileMessage.java
+++ b/src/java/org/apache/cassandra/streaming/messages/OutgoingFileMessage.java
@@ -115,6 +115,9 @@ public class OutgoingFileMessage extends StreamMessage
     @VisibleForTesting
     public synchronized void startTransfer()
     {
+        if (completed)
+            throw new RuntimeException(String.format("Transfer of file %s already completed
or aborted (perhaps session failed?).",
+                                                     filename));
         transferring = true;
     }
 


Mime
View raw message