sky-uk / cqlmigrate

Cassandra schema migration library
BSD 3-Clause "New" or "Revised" License
47 stars 29 forks source link

Cluster check should be configurable with an expected number of nodes #42

Open jsravn opened 7 years ago

jsravn commented 7 years ago

We ran into a problem where we replaced some cassandra nodes. The cluster was perfectly fine, but the old nodes were still in the system.peers table. So the migration failed, since it saw the old dead node as unhealthy.

I'd prefer if:

I think that should be sufficient to give us confidence that a schema change is safe to apply. The drawback is it adds more configuration - perhaps a simplification is to just check that a quorum of getAllHosts is available, rather than all of them.

sebbonnet commented 7 years ago

Making the cluster check optional #35 would prevent this issue and more generally the issue of applying schema upgrades when 1 node is down. Schema upgrades can still be done when 1 node is down. You do get a warning when applying the schema changes stating "schema version mismatch was detected", but the schema changes are applied to the nodes that are alive and later to the node that is down once it is brought by back up.