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: Continue with assassinate even if the endpoint vanishes during the sleep-for-safety check.
Date Thu, 03 Apr 2014 20:50:51 GMT
Continue with assassinate even if the endpoint vanishes during the
sleep-for-safety check.

Patch by brandonwilliams, reviewed by Jeremiah Jordan for CASSANDRA-6787


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

Branch: refs/heads/cassandra-2.0
Commit: 1b32b4c91c958dc1266db65381537f407b780bac
Parents: 43d35a6
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Apr 3 12:40:19 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu Apr 3 12:40:19 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     | 1 +
 src/java/org/apache/cassandra/gms/Gossiper.java | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b32b4c9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a9a93a4..b3a794f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 1.2.17
  * Fix BatchlogManager#deleteBatch() use of millisecond timsestamps
    (CASSANDRA-6822)
+ * Continue assassinating even if the endpoint vanishes (CASSANDRA-6787)
 
 
 1.2.16

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b32b4c9/src/java/org/apache/cassandra/gms/Gossiper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java b/src/java/org/apache/cassandra/gms/Gossiper.java
index b51bbd3..5d2780e 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -483,8 +483,10 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
                 throw new AssertionError(e);
             }
             // make sure it did not change
-            epState = endpointStateMap.get(endpoint);
-            if (epState.getHeartBeatState().getGeneration() != generation)
+            EndpointState newState = endpointStateMap.get(endpoint);
+            if (newState == null)
+                logger.warn("Endpoint {} disappeared while trying to assassinate, continuing
anyway", endpoint);
+            else if (newState.getHeartBeatState().getGeneration() != generation)
                 throw new RuntimeException("Endpoint " + endpoint + " generation changed
while trying to remove it");
             epState.updateTimestamp(); // make sure we don't evict it too soon
             epState.getHeartBeatState().forceNewerGenerationUnsafe();


Mime
View raw message