cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ariel Weisberg (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-10768) Optimize the way we check if a token is repaired in anticompaction
Date Mon, 30 Nov 2015 21:01:11 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-10768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15032428#comment-15032428
] 

Ariel Weisberg edited comment on CASSANDRA-10768 at 11/30/15 9:00 PM:
----------------------------------------------------------------------

Reviewed the code and the output of the existing tests and things seem to be passing. Looks
like Range.normalize has a unit test and we have several dtests that test repair and anticompaction.
I think the only tricky bit that would be nice to see covered explicitly are boundaries like
minimum token, minimum token + 1, maximum token, maximum token - 1.

Moving the logic to normalize, compare, and iterate on the token ranges into a helper class
in Range would be a nice to have instead of having it splatted into the body of the loop.
Then you could also unit test it for the boundary conditions.

Otherwise +1.


was (Author: aweisberg):
Review the code and the output of the existing tests and things seem to be passing. Looks
like Range.normalize has a unit test and we have several dtests that test repair that use
anticompaction. I think the only tricky bit that would be nice to see covered explicitly are
boundaries like minimum token, minimum token + 1, maximum token, maximum token - 1.

Moving the logic to normalize, compare, and iterate on the token ranges into a helper class
in Range would be a nice to have instead of having it splatted into the body of the loop.
Then you could also unit test it for the boundary conditions.

Otherwise +1.

> Optimize the way we check if a token is repaired in anticompaction
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-10768
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10768
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Marcus Eriksson
>            Assignee: Marcus Eriksson
>             Fix For: 2.1.x, 2.2.x, 3.0.x, 3.x
>
>
> When we anticompact we check each token if it is within a repaired range, this is very
inefficient with many tokens as we do a linear search instead of sorting the ranges and doing
a binary search (or even just keeping track of the next right-boundary and checking against
that to avoid 2 comparisons)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message