cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jolynch commented on a change in pull request #283: CASSANDRA-14459: DynamicEndpointSnitch should never prefer latent replicas
Date Tue, 29 Jan 2019 02:13:24 GMT
jolynch commented on a change in pull request #283: CASSANDRA-14459: DynamicEndpointSnitch
should never prefer latent replicas
URL: https://github.com/apache/cassandra/pull/283#discussion_r251669019
 
 

 ##########
 File path: src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
 ##########
 @@ -214,19 +600,27 @@ public String getDatacenter(InetAddressAndPort endpoint)
         {
             if (subsnitchScore > (sortedScoreIterator.next() * (1.0 + dynamicBadnessThreshold)))
             {
-                return sortedByProximityWithScore(address, replicas);
+                return sortedByProximityWithScore(address, replicas, aliasedScores);
             }
         }
 
         return replicas;
     }
 
     // Compare endpoints given an immutable snapshot of the scores
-    private int compareEndpoints(InetAddressAndPort target, Replica a1, Replica a2, Map<InetAddressAndPort,
Double> scores)
+    public int compareEndpoints(InetAddressAndPort target, Replica a1, Replica a2)
 
 Review comment:
   Not sure, I didn't write it just copied it over. I think the issue is that `IEndpointSnitch`
requires `compareEndpoints(InetAddressAndPort, Replica, Replica)` to be defined so that `AbstractEndpointSnitch::sortedByProximity`
works properly, but the only time that the DES would call it is if the DES is wrapping another
DES (as `compareEndpoints(InetAddressAndPort, Replica, Replica, Map<InetAddressAndPort,
Double>)` internally calls the `subsnitch.compareEndpoints` if it can't find a score.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


Mime
View raw message