cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/3] git commit: Try harder to not let a node flap after the gossip goodbye. Patch by brandonwilliams, reviewed by jasobrown for CASSANDRA-5254
Date Wed, 06 Mar 2013 22:10:15 GMT
Try harder to not let a node flap after the gossip goodbye.
Patch by brandonwilliams, reviewed by jasobrown for CASSANDRA-5254


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

Branch: refs/heads/cassandra-1.2
Commit: 62b1ee40b69540c01dcbf960c8a96df4b7d55336
Parents: 86e2cc5
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Wed Mar 6 15:52:30 2013 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Wed Mar 6 16:09:18 2013 -0600

----------------------------------------------------------------------
 .../cassandra/gms/GossipDigestAck2VerbHandler.java |    7 +++++++
 src/java/org/apache/cassandra/gms/Gossiper.java    |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/62b1ee40/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java b/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java
index 3fb9255..92b8463 100644
--- a/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java
@@ -37,6 +37,13 @@ public class GossipDigestAck2VerbHandler implements IVerbHandler<GossipDigestAck
             InetAddress from = message.from;
             logger.trace("Received a GossipDigestAck2Message from {}", from);
         }
+        if (!Gossiper.instance.isEnabled())
+        {
+            if (logger.isTraceEnabled())
+                logger.trace("Ignoring GossipDigestAck2Message because gossip is disabled");
+            return;
+        }
+
         Map<InetAddress, EndpointState> remoteEpStateMap = message.payload.getEndpointStateMap();
         /* Notify the Failure Detector */
         Gossiper.instance.notifyFailureDetector(remoteEpStateMap);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62b1ee40/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 c9d0d51..60ca850 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -1077,7 +1077,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
         logger.info("Announcing shutdown");
         try
         {
-            Thread.sleep(intervalInMillis);
+            Thread.sleep(intervalInMillis * 2);
         }
         catch (InterruptedException e)
         {


Mime
View raw message