cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cassandra] aweisberg commented on a change in pull request #283: CASSANDRA-14459: DynamicEndpointSnitch should never prefer latent replicas
Date Fri, 22 Mar 2019 23:29:59 GMT
aweisberg 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_r268248792
 
 

 ##########
 File path: src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
 ##########
 @@ -687,8 +731,16 @@ public String getSubsnitchClassName()
     /**
      * Dump the underlying metrics backing the DES's decisions for a given host. Since the
subclasses
      * might have different sampling techniques they need to implement this.
+     *
+     * Note that pre 4.0 this was milliseconds, so we keep backwards compatibility here.
      */
     public List<Double> dumpTimings(String hostname) throws UnknownHostException
+    {
+        List<Double> micros = dumpTimingsMicros(hostname);
+        return micros.stream().map(s -> s / 1000.0).collect(Collectors.toList());
 
 Review comment:
   You could use TimeUnit here and in some of the config values at the top of the class.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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