cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-14293) Speculative Retry Policy Should Support Specifying MIN/MAX of 2 PERCENTILE and FIXED Policies
Date Thu, 22 Mar 2018 15:31:00 GMT


Aleksey Yeschenko commented on CASSANDRA-14293:

I like this overall. Some issues:

1. {{PercentileSpeculativeRetryPolicy.isDynamic()}} should return {{true}}
2. {{FixedSpeculativeRetryPolicy.calculateThreshold()}} casts the double to long before converting
to nanos, losing precision - should do the opposite (pre-existing problem). But really we've
been treating it as an int all this time.. might as well recognise it now and ditch the double.
3. {{PercentileSpeculativeRetryPolicy.calculateThreshold()}} method invokes {{readLatency.getSnapshot().getValue()}}
with threshold divided by another 100, making us off by 100. Also the value returned is in
nanos already, so we don't have to mul by 1k (though this one is on me).
4. Moving to {{BigDecimal}} actually made things lossy quite a bit.. {{toString()}} with the
patch results in the following now.. 99.5 -> "99.0P", 99.95 -> "100.0P", 99.99 ->

And a small nit: in {{FixedSpeculativeRetryPolicy.toString()}}, you changed what used to be
{{ms}}, lower case, to {{MS}}, upper case.

> Speculative Retry Policy Should Support Specifying MIN/MAX of 2 PERCENTILE and FIXED
> ---------------------------------------------------------------------------------------------
>                 Key: CASSANDRA-14293
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Michael Kjellman
>            Assignee: Michael Kjellman
>            Priority: Major
>             Fix For: 4.x
> Currently the Speculative Retry Policy takes a single string as a parameter, this can
> The problem we have is when a single host goes into a bad state this drags up the percentiles.
This means if we are set to use p99 alone, we might not speculate when we intended to to
because the value at the specified percentile has gone so high.
> As a fix we need to have support for something like min(99percentile,50ms)
> this means if the normal p99 for the table is <50ms, we will still speculate at this
value and not drag the happy path tail latencies up... but if the p99th goes above what we
know we should never exceed we use that instead.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message