cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [3/3] git commit: Don't convict dead states. Patch by brandonwilliams, reviewed by Vijay for CASSANDRA-4115.
Date Tue, 22 May 2012 16:29:02 GMT
Don't convict dead states.
Patch by brandonwilliams, reviewed by Vijay for CASSANDRA-4115.


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

Branch: refs/heads/cassandra-1.1
Commit: b5f99a3364a6b0a8531d8bb1c240a8f0603b4f56
Parents: a1386f9
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue May 22 11:27:06 2012 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue May 22 11:27:06 2012 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/gms/Gossiper.java    |    2 +-
 .../apache/cassandra/service/StorageService.java   |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b5f99a33/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 e8cf5a8..53a38fc 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -267,7 +267,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
     public void convict(InetAddress endpoint, double phi)
     {
         EndpointState epState = endpointStateMap.get(endpoint);
-        if (epState.isAlive())
+        if (epState.isAlive() && !isDeadState(epState))
         {
             markDead(endpoint, epState);
         }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b5f99a33/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 10f9351..f7782f9 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2277,10 +2277,11 @@ public class StorageService implements IEndpointStateChangeSubscriber,
StorageSe
         calculatePendingRanges();
 
         Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.left(getLocalToken(),Gossiper.computeExpireTime()));
-        logger_.info("Announcing that I have left the ring for " + RING_DELAY + "ms");
+        int delay = Math.max(RING_DELAY, Gossiper.intervalInMillis * 2);
+        logger_.info("Announcing that I have left the ring for " + delay + "ms");
         try
         {
-            Thread.sleep(RING_DELAY);
+            Thread.sleep(delay);
         }
         catch (InterruptedException e)
         {


Mime
View raw message