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

Nick Bailey commented on CASSANDRA-1427:
----------------------------------------

Some initial comments:
* This change disallows moving when RF = N. The call to 
calculateNaturalEndpoints fails when you use the tokenmetadata that doesn't 
include the moving node. 
* We need to sleep for RING_DELAY before we start any streaming. Similar to how 
decommission does. Basically the other nodes need to calculate their pending 
ranges so they can start sending writes to the appropriate nodes. Once that 
happens we can stream. It might be nice to bypass the sleep if nothing is going 
to be streamed. It would make setting up the ring before any data is in it 
easier. 
* The check to see if data is moving to this node needs to be done in a loop at 
the beginning of the move method. By the time you throw the exception in the 
current implementation you've already gossiped the move state and calculated a 
bunch of ranges and whatnot. 
* You never await the latch in streamRanges so that call returns immediately. 
* It looks like decom is broken. There is a latch in unbootstrap that is waited 
on but never counted down. 
* Also in regards to the above point: I think we should try to combine a lot of 
the logic for calculating ranges that we are fetching or streaming. Can we have 
decom and move call the same method to calculate ranges to send to then do the 
actual sending and the same for bootstrap/move? Right now that move method is 
pretty hairy and it seems like it would be good to have that logic in a single 
spot. 

Gonna post this comment so it doesn't get lost, but I'm gonna still do some 
more reviewing.

> Optimize loadbalance/move for moves within the current range
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-1427
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1427
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>    Affects Versions: 0.7 beta 1
>            Reporter: Nick Bailey
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8
>
>         Attachments: CASSANDRA-1427-v2.patch, CASSANDRA-1427-v3.patch, 
> CASSANDRA-1427-v4.patch, CASSANDRA-1427.patch
>
>   Original Estimate: 42h
>          Time Spent: 42h
>  Remaining Estimate: 0h
>
> Currently our move/loadbalance operations only implement case 2 of the Ruhl 
> algorithm described at 
> https://issues.apache.org/jira/browse/CASSANDRA-192#action_12713079.
> We should add functionality to optimize moves that take/give ranges to a 
> node's direct neighbors.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to