cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [01/10] cassandra git commit: Mark node as dead even if already left
Date Thu, 08 Oct 2015 09:08:43 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 1b08cbd81 -> 484e6452b
  refs/heads/cassandra-2.2 be89dae3e -> 4bdc7bd40
  refs/heads/cassandra-3.0 9415c8460 -> 6b25c58d6
  refs/heads/trunk 397145219 -> b8a154706


Mark node as dead even if already left

Patch by Stefania Alborghetti; reviewed by Joel Knighton for
CASSANDRA-10205


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

Branch: refs/heads/cassandra-2.1
Commit: 484e6452bf08cf89fe37d5068fc7a6fb77058410
Parents: 1b08cbd
Author: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Authored: Fri Aug 28 14:51:57 2015 +0800
Committer: Sam Tunnicliffe <sam@beobal.com>
Committed: Thu Oct 8 09:58:50 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/484e6452/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d678efe..a9b11ae 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.11
+ * Mark nodes as dead even if they've already left (CASSANDRA-10205)
  * Update internal python driver used by cqlsh (CASSANDRA-10161)
 
 2.1.10

http://git-wip-us.apache.org/repos/asf/cassandra/blob/484e6452/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 808972a..05ba8c3 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -332,16 +332,19 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
         EndpointState epState = endpointStateMap.get(endpoint);
         if (epState == null)
             return;
-        if (isShutdown(endpoint) && epState.isAlive())
+
+        logger.debug("Convicting {} with status {} - alive {}", endpoint, getGossipStatus(epState),
epState.isAlive());
+        if (!epState.isAlive())
+            return;
+
+        if (isShutdown(endpoint))
         {
             markAsShutdown(endpoint);
         }
-        else if (epState.isAlive() && !isDeadState(epState))
+        else
         {
             markDead(endpoint, epState);
         }
-        else
-            epState.markDead();
     }
 
     /**


Mime
View raw message