Prevent NPE on FD conviction race Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-7940
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/05920cb3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05920cb3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05920cb3 Branch: refs/heads/cassandra-2.1 Commit: 05920cb38bc8559704450965ce4bb326a917c86a Parents: f19b4cb Author: Brandon Williams <brandonwilli...@apache.org> Authored: Wed Sep 17 14:06:10 2014 +0000 Committer: Brandon Williams <brandonwilli...@apache.org> Committed: Wed Sep 17 14:06:10 2014 +0000 ---------------------------------------------------------------------- src/java/org/apache/cassandra/gms/Gossiper.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/05920cb3/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 01299ea..4514da7 100644 --- a/src/java/org/apache/cassandra/gms/Gossiper.java +++ b/src/java/org/apache/cassandra/gms/Gossiper.java @@ -298,6 +298,8 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean public void convict(InetAddress endpoint, double phi) { EndpointState epState = endpointStateMap.get(endpoint); + if (epState == null) + return; if (epState.isAlive() && !isDeadState(epState)) { markDead(endpoint, epState);