[
https://issues.apache.org/jira/browse/CASSANDRA-4427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13423777#comment-13423777
]
Sylvain Lebresne commented on CASSANDRA-4427:
---------------------------------------------
In the check for bootstrap:
{noformat}
if (DatabaseDescriptor.isAutoBootstrap()
&& (SystemTable.bootstrapInProgress() || (!SystemTable.bootstrapComplete()
&& !schemaPresent)))
{noformat}
I believe the schemaPresent condition shouldn't be negated. We want to skip
boostrap is there is no schema, but bootstrap if there is one.
Even with that fixed, this breaks some of the unit tests (BoostrapperTest,
EmbeddedCassandraServiceTest, StreamingTransferTest and
AntiEntropyServiceStandardTest). Namely:
{noformat}
junit] java.lang.RuntimeException: No other nodes seen! Unable to bootstrap.If
you intended to start a single-node cluster, you should make sure your
broadcast_address (or listen_address) is listed as a seed. Otherwise, you need
to determine why the seed being contacted has no knowledge of the rest of the
cluster. Usually, this can be solved by giving all nodes the same seed list.
junit] at
org.apache.cassandra.dht.BootStrapper.getBootstrapSource(BootStrapper.java:127)
junit] at
org.apache.cassandra.dht.BootStrapper.getBalancedToken(BootStrapper.java:109)
junit] at
org.apache.cassandra.dht.BootStrapper.getBootstrapToken(BootStrapper.java:104)
junit] at
org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:629)
junit] at
org.apache.cassandra.service.StorageService.initServer(StorageService.java:526)
junit] at
org.apache.cassandra.dht.BootStrapperTest.testTokenRoundtrip(BootStrapperTest.java:50)
{noformat}
On committing to 1.0, I'm not sure what was the intention, but this feels a bit
bigger than what I'm plainly confortable pushing in 1.0 at this point, and it
feels we can tell people on 1.0 to wipe the data dir on a failed boostrap
before retrying. That's not a strong opposition though, more an opinion.
Nits:
* Instead of calculateEmptySchema(), I would have put the initialization fo
Schema.emptyVersion in a static block to make it explicit that it's a one time
initialization. Though if you made that on purpose because you don't like
static blocks, that's good enough for me.
* We log when we detect a boostrap failure, but it could be nice to also log
whether we're going to boostrap or not and why in the other case.
> Restarting a failed bootstrap instajoins the ring
> -------------------------------------------------
>
> Key: CASSANDRA-4427
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4427
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.0
> Reporter: Brandon Williams
> Assignee: Jonathan Ellis
> Fix For: 1.0.11, 1.1.3
>
> Attachments: 4427-v2.txt, 4427-v3.txt, 4427.txt
>
>
> I think when we made auto_bootstrap = true the default, we broke the check
> for the bootstrap flag, creating a dangerous situation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira