cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject cassandra git commit: Emit MOVED_NODE topology event when a node moves
Date Fri, 19 Dec 2014 00:39:20 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 345e69e1c -> d8bce5017


Emit MOVED_NODE topology event when a node moves

Patch by Adam Holmberg; reviewed by Tyler Hobbs for CASSANDRA-8373


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

Branch: refs/heads/cassandra-2.0
Commit: d8bce5017e1d1cdc96807ff5207706a0e150487f
Parents: 345e69e
Author: Adam Holmberg <adam.holmberg@datastax.com>
Authored: Thu Dec 18 18:38:35 2014 -0600
Committer: Tyler Hobbs <tyler@datastax.com>
Committed: Thu Dec 18 18:38:35 2014 -0600

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8bce501/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d429f2e..bad24e7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.12:
+ * Fix MOVED_NODE topology event never being emitted when a node
+   moves its token (CASSANDRA-8373)
  * Fix validation of indexes in COMPACT tables (CASSANDRA-8156)
  * Avoid StackOverflowError when a large list of IN values
    is used for a clustering column (CASSANDRA-8410)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8bce501/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 0456907..3daa66f 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -1605,6 +1605,7 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
             }
         }
 
+        boolean isMoving = tokenMetadata.isMoving(endpoint); // capture because updateNormalTokens
clears moving status
         tokenMetadata.updateNormalTokens(tokensToUpdateInMetadata, endpoint);
         for (InetAddress ep : endpointsToRemove)
         {
@@ -1617,7 +1618,7 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
         if (!localTokensToRemove.isEmpty())
             SystemKeyspace.updateLocalTokens(Collections.<Token>emptyList(), localTokensToRemove);
 
-        if (tokenMetadata.isMoving(endpoint)) // if endpoint was moving to a new token
+        if (isMoving)
         {
             tokenMetadata.removeFromMoving(endpoint);
 


Mime
View raw message