Repository: cassandra
Updated Branches:
  refs/heads/trunk 739de136d -> 16f29aac9


Force blocking flush of peers when removing endpoint.

Patch by Joel Knighton; reviewed by Stefania for CASSANDRA-10231


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

Branch: refs/heads/trunk
Commit: 50fae5df193a41c77a5b02a84c9350226eccaf9f
Parents: fc92c96
Author: Joel Knighton <joel.knigh...@datastax.com>
Authored: Thu Oct 8 18:35:13 2015 -0500
Committer: Marcus Eriksson <marc...@apache.org>
Committed: Mon Oct 12 08:26:09 2015 +0200

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/SystemKeyspace.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/50fae5df/src/java/org/apache/cassandra/db/SystemKeyspace.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/SystemKeyspace.java 
b/src/java/org/apache/cassandra/db/SystemKeyspace.java
index 689a33d..6112869 100644
--- a/src/java/org/apache/cassandra/db/SystemKeyspace.java
+++ b/src/java/org/apache/cassandra/db/SystemKeyspace.java
@@ -690,10 +690,7 @@ public final class SystemKeyspace
     public static synchronized void updateTokens(InetAddress ep, 
Collection<Token> tokens)
     {
         if (ep.equals(FBUtilities.getBroadcastAddress()))
-        {
-            removeEndpoint(ep);
             return;
-        }
 
         String req = "INSERT INTO system.%s (peer, tokens) VALUES (?, ?)";
         executeInternal(String.format(req, PEERS), ep, tokensAsSet(tokens));
@@ -755,6 +752,7 @@ public final class SystemKeyspace
     {
         String req = "DELETE FROM system.%s WHERE peer = ?";
         executeInternal(String.format(req, PEERS), ep);
+        forceBlockingFlush(PEERS);
     }
 
     /**

Reply via email to