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

Brandon Williams edited comment on CASSANDRA-4559 at 9/8/12 7:19 AM:
---------------------------------------------------------------------

For all the trouble this was to figure out, the cause and solution are 
remarkably simple.

calculateStreamAndFetchRanges breaks on the first intersection while iterating 
the range, which works fine with a single token, but not with many since there 
can be further intersections.  Simply removing the breaks here so the loops 
continue makes everything work correctly.

Also, since RangeRelocator calculates ranges upon instantiation, I moved this 
until after the ring delay sleep for announcement, purely as an optimization so 
the node can catch more relocation announcements while it sleeps before 
deciding what to stream.

                
      was (Author: brandon.williams):
    For all the trouble this was the figure out, the cause and solution are 
remarkably simple.

calculateStreamAndFetchRanges breaks on the first intersection while iterating 
the range, which works fine with a single token, but not with many since there 
can be further intersections.  Simply removing the breaks here so the loops 
continue makes everything work correctly.

Also, since RangeRelocator calculates ranges upon instantiation, I moved this 
until after the ring delay sleep for announcement, purely as an optimization so 
the node can catch more relocation announcements while it sleeps before 
deciding what to stream.

                  
> implement token relocation
> --------------------------
>
>                 Key: CASSANDRA-4559
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4559
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core, Tools
>    Affects Versions: 1.2.0 beta 1
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>              Labels: vnodes
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4559.txt
>
>
> Whatever the specifics of a _shuffle_ (see CASSANDRA-4443), it will be 
> necessary to relocate a range from one node to another.
> _Edit0: Linked in new patch containing tests._
> ----
> h3. Patches
> ||Compare||Raw diff||Description||
> |[010_refactor_range_move|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move]|[010_refactor_range_move.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move.diff]|No
>  Description|
> |[020_calculate_pending|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending]|[020_calculate_pending.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending.diff]|No
>  Description|
> |[030_relocate_token|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token]|[030_relocate_token.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token.diff]|No
>  Description|
> |[040_tests|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests]|[040_tests.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests.diff]|No
>  Description|
> ----
> _Note: These are branches managed with TopGit. If you are applying the patch 
> output manually, you will either need to filter the TopGit metadata files 
> (i.e. {{wget -O - <url> | filterdiff -x*.topdeps -x*.topmsg | patch -p1}}), 
> or remove them afterward ({{rm .topmsg .topdeps}})._

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to