You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Akshit Jain <ak...@iiitd.ac.in> on 2018/04/18 06:51:00 UTC

Token range redistribution

Hi,
If i replace a node does it redistributes the token range or when the node
again joins will it be allocated a new token range.

Use case:
I have booted a C* on AWS. I terminated a node and then boot a new node
assigned it the same ip and made it join the cluster.

In this case would the token range be redistributed and the node will get
the new token range.
Would the process be different for seed nodes?

Regards
Akshit Jain

Re: Token range redistribution

Posted by Richard Gray <ri...@smxemail.com>.
On 2018-04-19 21:20, kurt greaves wrote:
> That's assuming your data is perfectly consistent, which is unlikely. 
> Typically that strategy is a bad idea and you should avoid it.

Oh, it's definitely a bad idea. I was just pointing out that the OP 
might still be able to avoid data loss if they haven't swapped out too 
many nodes already.

--
Richard
_____________________________________________________________________________

This email has been filtered by SMX. For more info visit http://smxemail.com
_____________________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org


Re: Token range redistribution

Posted by kurt greaves <ku...@instaclustr.com>.
That's assuming your data is perfectly consistent, which is unlikely.
Typically that strategy is a bad idea and you should avoid it.

On Thu., 19 Apr. 2018, 07:00 Richard Gray, <ri...@smxemail.com>
wrote:

> On 2018-04-18 21:28, kurt greaves wrote:
> > replacing. Simply removing and adding back a new node without replace
> > address will end up with the new node having different tokens, which
> > would mean data loss in the use case you described.
>
> If you have replication factor N > 1, you haven't necessarily lost data
> unless you've swapped out N or more nodes (without using
> replace_address). If you've swapped out fewer than N nodes, you should
> still be able to restore consistency by running a repair.
>
> --
> Richard Gray
>
> _____________________________________________________________________________
>
> This email has been filtered by SMX. For more info visit
> http://smxemail.com
>
> _____________________________________________________________________________
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
> For additional commands, e-mail: user-help@cassandra.apache.org
>
>

Re: Token range redistribution

Posted by Richard Gray <ri...@smxemail.com>.
On 2018-04-18 21:28, kurt greaves wrote:
> replacing. Simply removing and adding back a new node without replace 
> address will end up with the new node having different tokens, which 
> would mean data loss in the use case you described.

If you have replication factor N > 1, you haven't necessarily lost data 
unless you've swapped out N or more nodes (without using 
replace_address). If you've swapped out fewer than N nodes, you should 
still be able to restore consistency by running a repair.

--
Richard Gray
_____________________________________________________________________________

This email has been filtered by SMX. For more info visit http://smxemail.com
_____________________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org


Re: Token range redistribution

Posted by kurt greaves <ku...@instaclustr.com>.
A new node always generates more tokens. A replaced node using
replace_address[_on_first_boot] will reclaim the tokens of the node it's
replacing. Simply removing and adding back a new node without replace
address will end up with the new node having different tokens, which would
mean data loss in the use case you described.

On Wed., 18 Apr. 2018, 16:51 Akshit Jain, <ak...@iiitd.ac.in> wrote:

> Hi,
> If i replace a node does it redistributes the token range or when the node
> again joins will it be allocated a new token range.
>
> Use case:
> I have booted a C* on AWS. I terminated a node and then boot a new node
> assigned it the same ip and made it join the cluster.
>
> In this case would the token range be redistributed and the node will get
> the new token range.
> Would the process be different for seed nodes?
>
> Regards
> Akshit Jain
>