You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2014/02/12 00:16:52 UTC

[2/5] git commit: Sleep for RING_DELAY before replacing with same IP Patch by brandonwilliams reviewed by Tyler Hobbs for CASSANDRA-6622

Sleep for RING_DELAY before replacing with same IP
Patch by brandonwilliams reviewed by Tyler Hobbs for CASSANDRA-6622


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

Branch: refs/heads/trunk
Commit: cf6b4888242d9f4ce891d051b02e6f9eb529d300
Parents: 1b8b7b5
Author: Brandon Williams <br...@apache.org>
Authored: Tue Feb 11 17:12:45 2014 -0600
Committer: Brandon Williams <br...@apache.org>
Committed: Tue Feb 11 17:12:45 2014 -0600

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 .../org/apache/cassandra/service/StorageService.java    | 12 ++++++++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf6b4888/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 82783f8..1bd9c6e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.16
+ * Fix broken streams when replacing with same IP (CASSANDRA-6622)
  * Fix upgradesstables NPE for non-CF-based indexes (CASSANDRA-6645)
  * Fix partition and range deletes not triggering flush (CASSANDRA-6655)
  * Fix mean cells and mean row size per sstable calculations (CASSANDRA-6667)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf6b4888/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 94dd73d..ec8c7c3 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -735,6 +735,18 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
                         }
                     }
                 }
+                else
+                {
+                    try
+                    {
+                        Thread.sleep(RING_DELAY);
+                    }
+                    catch (InterruptedException e)
+                    {
+                        throw new AssertionError(e);
+                    }
+
+                }
                 setMode(Mode.JOINING, "Replacing a node with token(s): " + tokens, true);
             }