cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6683) BADNESS_THRESHOLD does not working correctly with DynamicEndpointSnitch
Date Tue, 11 Feb 2014 21:15:19 GMT


Tyler Hobbs commented on CASSANDRA-6683:

CASSANDRA-6465 doesn't affect what [] is referring to.  However, when the score
for {{first}} is less than {{next}}, the DES is behaving correctly.  Although {{first - next
/ first}} results in a negative number, that result is less than {{BADNESS_THRESHOLD}}, which
results in the DES saying that {{first}} should be used.  This is the correct behavior because
{{first}} has a lower score (less "badness") than {{next}}.

The whole point of this check is that the DES should only use something other than {{first}}
if the score for {{next}} is lower (less bad) than the score for {{first}} by a certain margin

> BADNESS_THRESHOLD does not working correctly with DynamicEndpointSnitch
> -----------------------------------------------------------------------
>                 Key: CASSANDRA-6683
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: Linux 3.8.0-33-generic
>            Reporter: Kirill Bogdanov
>              Labels: snitch
>             Fix For: 2.0.6
> There is a problem in ** in sortByProximityWithBadness()
> Before calling sortByProximityWithScore we comparing each nodes score ratios to the badness
> {code}
> if ((first - next) / first >  BADNESS_THRESHOLD)
>             {
>                 sortByProximityWithScore(address, addresses);
>                 return;
>             }
> {code}
> This is not always the correct comparison because *first* score can be less than *next*
 score and in that case we will compare a negative number with positive.
> The solution is to compute absolute value of the ratio:
> {code}
> if (Math.abs((first - next) / first) > BADNESS_THRESHOLD)
> {code}
> This issue causing an incorrect sorting of DCs based on their performance and affects
performance of the snitch.
> Thanks.

This message was sent by Atlassian JIRA

View raw message