Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

Tri avatar image
Tri asked ·

Would the bootstrapping a node in a new DC after modifying KS replication be equivalent to nodetool rebuild?

[FOLLOW UP QUESTION TO #6430]

[The answer to #6430] prompts another question. The point here is to help me better understand nodetool rebuild not to avoid it.

Sooner or later, the Keyspace replication strategy should take in account the new DC. What if I modify upfront the keyspace in the existing DC BEFORE the new DC comes to existence:

ALTER KEYSPACE mykeyspace WITH replication = {
  'class': 'NetworkTopologyStrategy',
  'currentDC':3,
  'newDC':3
};

Then I bootstrap a new node in the new DC. Would the bootstraping (of the new node) this time be equivalent to a nodetool rebuild ?

rebuild
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

No, it is not equivalent.

Your approach is invalid and is in fact quite a bad thing to do. When you update the replication settings of a keyspace and add replicas in a non-existent DC, new writes to the keyspace will fail because the coordinator node will not be able to find any replicas in the non-existent DC.

You should only change the replication settings once nodes have been brought online in the new DC. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.