You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jason Brown (JIRA)" <ji...@apache.org> on 2013/01/18 15:42:14 UTC

[jira] [Comment Edited] (CASSANDRA-5128) Stream hints on decommission

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

Jason Brown edited comment on CASSANDRA-5128 at 1/18/13 2:41 PM:
-----------------------------------------------------------------

Moved the logic of finding an alive host and streaming the hints into a new method, streamHints(), which is called by unbootstrap(). 

Also found a minor bug in Jonathan's patch:

{code}List<InetAddress> candidates = new ArrayList<InetAddress>
(StorageService.instance.getTokenMetadata().cloneAfterAllLeft().getAllEndpoints());{code}

TM.cloneAfterAllLeft() calls cloneOnlyTokenMap(), which sets up the tokenToEndpointMap field but not the endpointToHostIdMap. Then getAllEndpoints() is called on new TM, which refers to an empty endpointToHostIdMap map. Thus, in cloneOnlyTokenMap() I've added setting up the endpointToHostIdMap. I think it should be reasonably harmless.
                
      was (Author: jasobrown):
    Moved the logic of finding an alive host into a new method, streamHints(), which is called by unbootstrap(). 

Also found a minor bug in Jonathan's patch:

{code}List<InetAddress> candidates = new ArrayList<InetAddress>(StorageService.instance.getTokenMetadata().cloneAfterAllLeft().getAllEndpoints());{code}

TM.cloneAfterAllLeft() calls cloneOnlyTokenMap(), which sets up the tokenToEndpointMap field but not the endpointToHostIdMap. Then getAllEndpoints() is called on new TM, which refers to an empty endpointToHostIdMap map. Thus, in cloneOnlyTokenMap() I've added setting up the endpointToHostIdMap. I think it should be reasonably harmless.
                  
> Stream hints on decommission
> ----------------------------
>
>                 Key: CASSANDRA-5128
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5128
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2.1
>            Reporter: Jason Brown
>            Assignee: Jason Brown
>              Labels: decommission, hints
>         Attachments: 0001-CASSANDRA-5128-stream-hints-on-decommission.patch, 5128-v2.txt, 5128-v3.patch
>
>
> Looks like decommissioning a node (nodetool decommission) will stream all the non-system table data out to it's appropriate peers (StorageService.unbootstrap()), but hints will disappear with the node. Let's send those hints to another peer (preferably in the same rack, and hopefully at least the same datacenter) them to be replayed.
> The use case here is auto-scaling vnode clusters in ec2. When auto-scaling down, I'd want to call decommission on the node to leave the ring (and be terminated), and still have all of it's artifacts (data and hints) survive.

--
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