You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ms...@apache.org on 2016/08/16 22:42:35 UTC

[34/50] [abbrv] cassandra git commit: Throw RuntimeException if starting transfer of already completed OutgoingFileMessage

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 <pa...@gmail.com>
Authored: Fri Aug 12 22:06:27 2016 -0300
Committer: Yuki Morishita <yu...@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;
     }