cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [12/17] git commit: Backport CASSANDRA-3600 to 0.8
Date Thu, 05 Apr 2012 20:11:55 GMT
Backport CASSANDRA-3600 to 0.8


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

Branch: refs/heads/cassandra-1.1.0
Commit: 1a42cf3f8e3ef33b22c3f7cf32c981eb2eb3de93
Parents: c5e2428
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Apr 5 14:53:54 2012 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu Apr 5 14:53:54 2012 -0500

----------------------------------------------------------------------
 .../apache/cassandra/service/StorageService.java   |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1a42cf3f/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 808d6de..132628b 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -79,7 +79,7 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe
 {
     private static Logger logger_ = LoggerFactory.getLogger(StorageService.class);     
 
-    public static final int RING_DELAY = 30 * 1000; // delay after which we assume ring has
stablized
+    public static final int RING_DELAY = getRingDelay(); // delay after which we assume ring
has stablized
 
     /* All verb handler identifiers */
     public enum Verb
@@ -146,6 +146,17 @@ public class StorageService implements IEndpointStateChangeSubscriber,
StorageSe
         put(Verb.UNUSED_3, Stage.INTERNAL_RESPONSE);
     }};
 
+    private static int getRingDelay()
+    {
+        String newdelay = System.getProperty("cassandra.ring_delay_ms");
+        if (newdelay != null)
+        {
+            logger_.warn("Overriding RING_DELAY to {}ms", newdelay);
+            return Integer.parseInt(newdelay);
+        }
+        else
+            return 30 * 1000;
+    }
 
     /**
      * This pool is used for periodic short (sub-second) tasks.


Mime
View raw message