You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/06/24 20:46:50 UTC

[jira] Commented: (CASSANDRA-1011) Exception auto-bootstrapping two nodes nodes at the same time

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

Jonathan Ellis commented on CASSANDRA-1011:
-------------------------------------------

i don't think the window between when the bootstrapping machine chooses a machine to ask for a token, and when it actually does so (sub ms under any scenario i can think of) is large enough to add the extra check in getBalancedToken.  either way the main danger is that some node has already chosen the same token but we haven't heard about it yet over gossip.

it would be worth checking though in getBootstrapSource that if sorted node zero has a bootstrap target already (i.e., _every_ node already has one), then we should fail the bootstrap (and tell the user to specify an initialtoken manually, or wait for one of the current bootstraps to finish).

> Exception auto-bootstrapping two nodes nodes at the same time
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-1011
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1011
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Erick Tryzelaar
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: 0001-check-pending-tokens-before-accepting-a-token.patch
>
>
> I've got a small cluster of 3 machines, and after starting the first node (which is the seed), I brought up the other two nodes at the same time. This exception then gets raised on the seed node. Looks like the seed node is assigning the same token to the subnodes at the same time:
> ERROR 21:46:49,417 Error in ThreadPoolExecutor
> java.lang.RuntimeException: Bootstrap Token collision between /10.0.0.2 and /10.0.0.3 (token Token(bytes[4c617374204d6967726174696f6e])
> 	at org.apache.cassandra.locator.TokenMetadata.addBootstrapToken(TokenMetadata.java:130)
> 	at org.apache.cassandra.service.StorageService.handleStateBootstrap(StorageService.java:548)
> 	at org.apache.cassandra.service.StorageService.onChange(StorageService.java:511)
> 	at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:705)
> 	at org.apache.cassandra.gms.Gossiper.applyApplicationStateLocally(Gossiper.java:670)
> 	at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:624)
> 	at org.apache.cassandra.gms.Gossiper$GossipDigestAck2VerbHandler.doVerb(Gossiper.java:1016)
> 	at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:41)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> 	at java.lang.Thread.run(Thread.java:636)
> ERROR 21:46:49,418 Fatal exception in thread Thread[GMFD:1,5,main]
> java.lang.RuntimeException: Bootstrap Token collision between /10.0.0.2 and /10.0.0.3 (token Token(bytes[4c617374204d6967726174696f6e])
> 	at org.apache.cassandra.locator.TokenMetadata.addBootstrapToken(TokenMetadata.java:130)
> 	at org.apache.cassandra.service.StorageService.handleStateBootstrap(StorageService.java:548)
> 	at org.apache.cassandra.service.StorageService.onChange(StorageService.java:511)
> 	at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:705)
> 	at org.apache.cassandra.gms.Gossiper.applyApplicationStateLocally(Gossiper.java:670)
> 	at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:624)
> 	at org.apache.cassandra.gms.Gossiper$GossipDigestAck2VerbHandler.doVerb(Gossiper.java:1016)
> 	at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:41)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> 	at java.lang.Thread.run(Thread.java:636)

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