cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject [1/3] cassandra git commit: Better bootstrap failure message when blocked by (potential) range movement
Date Wed, 16 Aug 2017 03:09:44 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.11 db57cbddc -> 2795d72b4
  refs/heads/trunk 256a74faa -> 22b2a82f7


Better bootstrap failure message when blocked by (potential) range movement

 patch by Mick Semb Wever; reviewed by Jeff Jirsa  for CASSANDRA-13744


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

Branch: refs/heads/cassandra-3.11
Commit: 2795d72b46e493b87f74a4eb9c25520adff58f8c
Parents: db57cbd
Author: Mick Semb Wever <mck@apache.org>
Authored: Fri Aug 4 23:44:26 2017 +1000
Committer: mck <mick@thelastpickle.com>
Committed: Wed Aug 16 12:41:21 2017 +1000

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2795d72b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5403812..4ede932 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.11.1
+ * Better bootstrap failure message when blocked by (potential) range movement (CASSANDRA-13744)
  * "ignore" option is ignored in sstableloader (CASSANDRA-13721)
  * Deadlock in AbstractCommitLogSegmentManager (CASSANDRA-13652)
  * Duplicate the buffer before passing it to analyser in SASI operation (CASSANDRA-13512)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2795d72b/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 29619c4..cbf69b4 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -899,7 +899,10 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
                         tokenMetadata.getMovingEndpoints().size() > 0
                     ))
             {
-                throw new UnsupportedOperationException("Other bootstrapping/leaving/moving
nodes detected, cannot bootstrap while cassandra.consistent.rangemovement is true");
+                String bootstrapTokens = StringUtils.join(tokenMetadata.getBootstrapTokens().valueSet(),
',');
+                String leavingTokens = StringUtils.join(tokenMetadata.getLeavingEndpoints(),
',');
+                String movingTokens = StringUtils.join(tokenMetadata.getMovingEndpoints().stream().map(e
-> e.right).toArray(), ',');
+                throw new UnsupportedOperationException(String.format("Other bootstrapping/leaving/moving
nodes detected, cannot bootstrap while cassandra.consistent.rangemovement is true. Nodes detected,
bootstrapping: %s; leaving: %s; moving: %s;", bootstrapTokens, leavingTokens, movingTokens));
             }
 
             // get bootstrap tokens


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message