[ 
https://issues.apache.org/jira/browse/CASSANDRA-541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jaakko Laine updated CASSANDRA-541:
-----------------------------------

    Attachment: 0005-fix-pending-ranges-handling-in-node-move.txt

I think there are two cases in movement:

(I) Node moves to a new position in the ring
(II) Node extends its range by modifying token (special case of (I))

For (I) I think we need to do the following transition: -> LEAVING(oldToken) -> 
LEFT(oldToken) -> BOOTSTRAPPING (newToken) -> NORMAL(newToken). I don't see any 
way to cut corners here as we need to stream our old ranges away, signal the 
end of that operation, and then bootstrap to the new range. This is exactly the 
same as decommission -> bootsrap. Attached patch modifies StorageService 
accordingly. We could perhaps jump from LEAVING directly to BOOTSRAPPING, but 
removing pending ranges reliably becomes slightly fragile as old token is not 
part of bootstrapping message. Better to signal that clearly by a separate 
state I think.

(II) is a special case of (I) as the node already has part of its future range. 
For this case we could use STATE_MOVING to signal that we're not changing our 
whole range, only adding to it. Since this transition only involves streaming 
data between the node and its successor, I think NORMAL - MOVING(newToken) -> 
NORMAL(newToken) would be sufficient. The only nagging worry here is what 
happens to the data that moves from the successor to the node enlarging its 
range. If done directly between these two nodes, we might easily violate 
replica placement rules for this range.

Anyway, since (I) works for all move scenarios (only wastes a lot of energy if 
(II) would be sufficient), I think we could move that to a separate task and 
first commit this patchset.


> allow moving a live node with data on it
> ----------------------------------------
>
>                 Key: CASSANDRA-541
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-541
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core, Tools
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>             Fix For: 0.5
>
>         Attachments: 0001-CASSANDRA-541-add-Move-command.txt, 
> 0002-miscellaneous-fixes.txt, 
> 0003-fix-for-when-bootstrap-source-has-no-data-in-the-range.txt, 
> 0004-workaround-for-Resource-temporarily-unavailable.txt, 
> 0005-fix-pending-ranges-handling-in-node-move.txt, 
> 0005-fix-pending-ranges-handling-in-node-move.txt
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to