You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jw...@apache.org on 2020/11/19 00:05:24 UTC

[cassandra] branch trunk updated: Set dynamic snitch default badness threshold to 1.0

This is an automated email from the ASF dual-hosted git repository.

jwest pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new fae1f88  Set dynamic snitch default badness threshold to 1.0
fae1f88 is described below

commit fae1f883541f329f7575d6ff4117b230e371293b
Author: Jordan West <jw...@apache.org>
AuthorDate: Wed Nov 18 08:32:44 2020 -0800

    Set dynamic snitch default badness threshold to 1.0
    
    Patch by Jordan West; Reviewed by David Capwell for CASSANDRA-16285
---
 CHANGES.txt                                                           | 1 +
 conf/cassandra.yaml                                                   | 2 +-
 src/java/org/apache/cassandra/config/Config.java                      | 2 +-
 test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java | 1 +
 4 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 7d904a9..0d93b85 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -18,6 +18,7 @@ Merged from 3.0:
  * Remove the SEPExecutor blocking behavior (CASSANDRA-16186)
  * Wait for schema agreement when bootstrapping (CASSANDRA-15158)
  * Prevent invoking enable/disable gossip when not in NORMAL (CASSANDRA-16146)
+ * Raise Dynamic Snitch Default Badness Threshold to 1.0 (CASSANDRA-16285)
 
 4.0-beta3
  * Segregate Network and Chunk Cache BufferPools and Recirculate Partially Freed Chunks (CASSANDRA-15229)
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index 11e54ad..066d22e 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -1062,7 +1062,7 @@ dynamic_snitch_reset_interval_in_ms: 600000
 # expressed as a double which represents a percentage.  Thus, a value of
 # 0.2 means Cassandra would continue to prefer the static snitch values
 # until the pinned host was 20% worse than the fastest.
-dynamic_snitch_badness_threshold: 0.1
+dynamic_snitch_badness_threshold: 1.0
 
 # Configure server-to-server internode encryption
 #
diff --git a/src/java/org/apache/cassandra/config/Config.java b/src/java/org/apache/cassandra/config/Config.java
index cde7d53..464f8ad 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -266,7 +266,7 @@ public class Config
     public boolean dynamic_snitch = true;
     public int dynamic_snitch_update_interval_in_ms = 100;
     public int dynamic_snitch_reset_interval_in_ms = 600000;
-    public double dynamic_snitch_badness_threshold = 0.1;
+    public double dynamic_snitch_badness_threshold = 1.0;
 
     public EncryptionOptions.ServerEncryptionOptions server_encryption_options = new EncryptionOptions.ServerEncryptionOptions();
     public EncryptionOptions client_encryption_options = new EncryptionOptions();
diff --git a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java
index 069c222..b7d4243 100644
--- a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java
+++ b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java
@@ -66,6 +66,7 @@ public class DynamicEndpointSnitchTest
     public void testSnitch() throws InterruptedException, IOException, ConfigurationException
     {
         // do this because SS needs to be initialized before DES can work properly.
+        DatabaseDescriptor.setDynamicBadnessThreshold(0.1);
         StorageService.instance.unsafeInitialize();
         SimpleSnitch ss = new SimpleSnitch();
         DynamicEndpointSnitch dsnitch = new DynamicEndpointSnitch(ss, String.valueOf(ss.hashCode()));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org