cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [02/10] git commit: Update system.peers correctly when relocating tokens.
Date Fri, 02 May 2014 20:52:10 GMT
Update system.peers correctly when relocating tokens.

Patch by brandonwilliams, reviewed by tjake for CASSANDRA-7126


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

Branch: refs/heads/cassandra-2.0
Commit: 562a22fcd29b215f921ed3a4f4fe26b6f2290530
Parents: ad40451
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Fri May 2 15:46:11 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Fri May 2 15:46:11 2014 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/562a22fc/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d951568..1c67331 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.17
+ * Update system.peers correctly when relocating tokens (CASSANDRA-7126)
  * Add Google Compute Engine snitch (CASSANDRA-7132)
  * Fix nodetool display with vnodes (CASSANDRA-7082)
  * Fix schema concurrency exceptions (CASSANDRA-6841)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/562a22fc/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 3b2d945..992a13a 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -1535,8 +1535,9 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
             else if (endpoint.equals(currentOwner))
             {
                 // set state back to normal, since the node may have tried to leave, but
failed and is now back up
-                // no need to persist, token/ip did not change
                 tokensToUpdateInMetadata.add(token);
+                if (!isClientMode)
+                    tokensToUpdateInSystemKeyspace.add(token);
             }
             else if (tokenMetadata.isRelocating(token) && tokenMetadata.getRelocatingRanges().get(token).equals(endpoint))
             {


Mime
View raw message