1
votes

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?

1
it'll not lock but remember to run repair after alter - ROHIT KHURANA
Right now it doesn't have any additional data center, but i'll add a new one. So still I need to run the repair? - Bhuvanesh
after alter you need to run repair. - ROHIT KHURANA

1 Answers

1
votes

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.