Revert "use zero as default score in DynamicEndpointSnitch" from 3.0 and 3.11

This reverts commit 15bd10afbfc5eda024e7048438b00bfc81a9e3ea.

More details CASSANDRA-14555


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

Branch: refs/heads/cassandra-3.11
Commit: 8ead7af140c778542d3ea1244675320cd22b3042
Parents: a4b8d1e
Author: Jay Zhuang <jay.zhu...@yahoo.com>
Authored: Thu Jul 5 09:38:17 2018 -0700
Committer: Jay Zhuang <jay.zhu...@yahoo.com>
Committed: Thu Jul 5 09:38:17 2018 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                        | 1 -
 src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java   | 2 +-
 .../org/apache/cassandra/locator/DynamicEndpointSnitchTest.java    | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8ead7af1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 00944dc..6f6ae20 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -19,7 +19,6 @@
  * Handle all exceptions when opening sstables (CASSANDRA-14202)
  * Handle incompletely written hint descriptors during startup 
(CASSANDRA-14080)
  * Handle repeat open bound from SRP in read repair (CASSANDRA-14330)
- * Use zero as default score in DynamicEndpointSnitch (CASSANDRA-14252)
  * Respect max hint window when hinting for LWT (CASSANDRA-14215)
  * Adding missing WriteType enum values to v3, v4, and v5 spec 
(CASSANDRA-13697)
  * Don't regenerate bloomfilter and summaries on startup (CASSANDRA-11163)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8ead7af1/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java 
b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
index 5356e8c..8c255f5 100644
--- a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
+++ b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
@@ -186,7 +186,7 @@ public class DynamicEndpointSnitch extends 
AbstractEndpointSnitch implements ILa
         {
             Double score = scores.get(inet);
             if (score == null)
-                score = 0.0;
+                continue;
             subsnitchOrderedScores.add(score);
         }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8ead7af1/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java
----------------------------------------------------------------------
diff --git 
a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java 
b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java
index 866cd82..af7dc17 100644
--- a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java
+++ b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java
@@ -92,7 +92,7 @@ public class DynamicEndpointSnitchTest
         assertEquals(order, dsnitch.getSortedListByProximity(self, 
Arrays.asList(host1, host2, host3, host4)));
 
         setScores(dsnitch, 20, hosts, 10, 10, 10);
-        order = Arrays.asList(host4, host1, host2, host3);
+        order = Arrays.asList(host1, host2, host3, host4);
         assertEquals(order, dsnitch.getSortedListByProximity(self, 
Arrays.asList(host1, host2, host3, host4)));
     }
 }


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

Reply via email to