question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cassandra: Add a cluster level lock to prevent any migration while the topology of the cluster is being modified

See original GitHub issue

Following a discussion with @doanduyhai, it appears that it is an extremely bad idea to make any schema changes while the topology of the cluster is being modified (more on this here: https://www.slideshare.net/doanduyhai/cassandra-nice-use-cases-and-worst-anti-patterns-no-sqlmatters-barcelona/44).

The best approach seems to create an applicative lock (implementing CassandraCluster.TryAcquireApplicationLock) that checks the existence of a predetermined keyspace and not execute migration if this item exists.

Using this, a system administrators could create that keyspace to prevent any Evolve migration from taking place (it would be wise to wait for all deployments to complete though since some migration could potentially be taking place still, the only guarantee is that no new Evolve migration is going to start), then make change to the topology and finally deleting the keyspace to release the lock and allow deployments again.

@doanduyhai, if you have any comments/suggestions 😉

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
doanduyhaicommented, Apr 9, 2018

so we don’t even need a keyspace_to_lock column but only one

Yes correct. In this case to block schema change on the whole cluster, you need to use the consistency SERIAL instead of LOCAL_SERIAL for your LWT

0reactions
lecailloncommented, Jun 9, 2018

@Pvlerick Is this always an openned issue ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The cassandra.yaml configuration file
This setting prevents nodes in one logical cluster from joining another. All nodes in a cluster must have the same value. listen_address: (Default:...
Read more >
cassandra.yaml file configuration
This is mainly used to prevent machines in one logical cluster from joining another. Default Value: 'Test Cluster'. num_tokens. This defines the number...
Read more >
Apache Cassandra: An Introductory Guide
The definitive guide to understanding Apache Cassandra. Learn all about Cassandra including FAQs: what is Apache Cassandra, database design & more.
Read more >
Cassandra - Cannot achieve consistency level QUORUM
I managed to solve the problem. I had to run ALTER KEYSPACE system_auth WITH replication = { 'class' : 'SimpleStrategy', ...
Read more >
Cassandra Installation and Configuration Guide
Prior to creating a Cassandra cluster, it is important to first modify a few core settings in cassandra.yaml: cluster_name: Name of the Cassandra...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found