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/trunk Commit: 484e6452bf08cf89fe37d5068fc7a6fb77058410 Parents: 1b08cbd Author: Stefania Alborghetti <stefania.alborghe...@datastax.com> Authored: Fri Aug 28 14:51:57 2015 +0800 Committer: Sam Tunnicliffe <s...@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(); } /**