cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/3] git commit: Don't update local tokens when localTokensToRemove is empty
Date Tue, 15 Jan 2013 17:09:32 GMT
Don't update local tokens when localTokensToRemove is empty


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

Branch: refs/heads/cassandra-1.2
Commit: bc575ae28f26ac7be239839ffbb191045cce8b8c
Parents: dcddfaf
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue Jan 15 11:09:29 2013 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue Jan 15 11:09:29 2013 -0600

----------------------------------------------------------------------
 .../apache/cassandra/service/StorageService.java   |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc575ae2/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 fe3ee93..eb62032 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -1390,7 +1390,8 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
             Gossiper.instance.removeEndpoint(ep);
         if (!tokensToUpdateInSystemTable.isEmpty())
             SystemTable.updateTokens(endpoint, tokensToUpdateInSystemTable);
-        SystemTable.updateLocalTokens(Collections.<Token>emptyList(), localTokensToRemove);
+        if (!localTokensToRemove.isEmpty())
+            SystemTable.updateLocalTokens(Collections.<Token>emptyList(), localTokensToRemove);
 
         if (tokenMetadata.isMoving(endpoint)) // if endpoint was moving to a new token
         {


Mime
View raw message