[
https://issues.apache.org/jira/browse/CASSANDRA-3219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sylvain Lebresne updated CASSANDRA-3219:
----------------------------------------
Attachment: 3219_v2.patch
bq. auto and random initial_token modes added.
I hate it and I'm -1 on that idea.
Basically, I think that it's more complicated to explain/understand how to
choose between those two options that it was to explain the "old"
auto-bootstrap option while it's essentially the same option. The default to
random would also make it more likely for people to leave it at that when
bootstrapping new nodes, while random is really the worst possible algorithm
you can use expect maybe for the 2-3 initial nodes of a cluster (and even then
it's really only admissible because the balanced token algorithm don't work in
that case and picking random token is the only simple choice we have).
I'd rather add back the auto-bootstrap option than setting the initial_token to
random.
As for alternatives, I can propose one of:
* Decide whether we are really bootstrapping (if we are, balanced token is
the "right" automatic choice, otherwise we have no other choice than to fall
back to random tokens) or not based on whether there is a keyspace defined
already. That is the same test we use to decide whether we actually do some
bootstrap streaming or not so this doesn't seem too far fetched (attaching a v2
patch for that to make it clear what I mean here).
* Stop pretending we know how to pick up token automatically and just force
user to set a token. We can default that token to 0 so that you can start a
single node cluster with 0 configuration and we can ship a new small tiny
script that compute the tokens for a n node initial cluster if we want people
to be able to do without a calculator.
> Nodes started at the same time end up with the same token
> ---------------------------------------------------------
>
> Key: CASSANDRA-3219
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3219
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.0.0
> Reporter: T Jake Luciani
> Assignee: Jonathan Ellis
> Labels: bootstrap
> Fix For: 1.0.0
>
> Attachments: 3219.txt, 3219_v2.patch
>
>
> Since autoboostrap is defaulted to on when you start a cluster at once
> (http://screenr.com/5G6) you can end up with nodes being assigned the same
> token.
> {code}
> INFO 17:34:55,688 Node /67.23.43.14 is now part of the cluster
> INFO 17:34:55,698 InetAddress /67.23.43.14 is now UP
> INFO 17:34:55,698 Nodes /67.23.43.14 and tjake2/67.23.43.15 have the same
> token 8823900603000512634329811229926543166. Ignoring /67.23.43.14
> INFO 17:34:55,698 Node /98.129.220.182 is now part of the cluster
> INFO 17:34:55,698 InetAddress /98.129.220.182 is now UP
> INFO 17:34:55,698 Nodes /98.129.220.182 and tjake2/67.23.43.15 have the same
> token 8823900603000512634329811229926543166. Ignoring /98.129.220.182
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira