cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [2/4] 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:06:25 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/2b87bfe5
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2b87bfe5
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2b87bfe5

Branch: refs/heads/trunk
Commit: 2b87bfe55293ce1f2541a1ea17be67828a13ccdf
Parents: aba9a17
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 15:52:30 2013 -0600

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b87bfe5/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 e9108e9..84bc3cb 100644
--- a/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigestAck2VerbHandler.java
@@ -44,6 +44,12 @@ public class GossipDigestAck2VerbHandler implements IVerbHandler
             InetAddress from = message.getFrom();
             logger_.trace("Received a GossipDigestAck2Message from {}", from);
         }
+        if (!Gossiper.instance.isEnabled())
+        {
+            if (logger_.isTraceEnabled())
+                logger_.trace("Ignoring GossipDigestAck2Message because gossip is disabled");
+            return;
+        }
 
         byte[] bytes = message.getMessageBody();
         DataInputStream dis = new DataInputStream( new FastByteArrayInputStream(bytes) );

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b87bfe5/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 813c4c6..997ff71 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -1134,7 +1134,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