TheDataGuy
TheDataGuy

Reputation: 3118

Cassandra - alter Keyspace without downtime

I'm coming from a relational databases background. In PostgreSQL or MySQL if we do any alter statement it'll lock the entire table.

I have a Cassandra cluster(3 nodes) that has SimpleStretegy for all the keyspaces. One keyspace has 4 tables and each table has 500GB data.

So if I alter the keyspace to change the strategy, is there any lock or block?

Upvotes: 1

Views: 359

Answers (1)

Alex Ott
Alex Ott

Reputation: 87329

The change itself is fast, keyspace in Cassandra is not the physical object, it's just a metadata. But when you change replication, you need to run repair operation as per documentation:

Simply altering the keyspace may lead to faulty data replication.

If you have one datacenter, then you may not get this problem, but it still better to run the repair.

Upvotes: 1

Related Questions