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

Paulo Motta commented on CASSANDRA-16364:
-----------------------------------------

bq. I will point out that simultaneous bootstrap is actually not valid after 
CASSANDRA-2434, so I don't think this is technically a regression.

The issue happens with {{auto_bootstrap: false}}. Previously since token 
generation was random, the likelihood of token collision existed but was pretty 
low. With {{allocate_tokens_for_local_rf}} by default, since token generation 
is deterministic the likelihood of collision is higher if all nodes are brought 
up simultaneously (such as when instantiating a new DC or bringing up a CCM 
cluster). For instance we have nodes A, B and C. Nodes B and C don't see each 
other but see node A so they generate the same tokens and collide, only one of 
them succeed.

> Simultaneous bootstrap can cause token collision
> ------------------------------------------------
>
>                 Key: CASSANDRA-16364
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16364
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Cluster/Membership
>            Reporter: Paulo Motta
>            Priority: Urgent
>             Fix For: 4.0.x
>
>
> While raising a 6-node ccm cluster to test 4.0-beta4, 2 nodes chosen the same 
> tokens using the default {{allocate_tokens_for_local_rf}}. However they both 
> succeeded bootstrap with colliding tokens.
> We were familiar with this issue from CASSANDRA-13701 and CASSANDRA-16079, 
> and the workaround to fix this is to avoid parallel bootstrap when using 
> {{allocate_tokens_for_local_rf}}.
> However, since this is the default behavior, we should try to detect and 
> prevent this situation when possible, since it can break users relying on 
> parallel bootstrap behavior.
> I think we could prevent this as following:
> 1. announce intent to bootstrap via gossip (ie. add node on gossip without 
> token information)
> 2. wait for gossip to settle for a longer period (ie. ring delay)
> 3. allocate tokens (if multiple bootstrap attempts are detected, tie break 
> via node-id)
> 4. broadcast tokens and move on with bootstrap



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to