0

According to the documentation, when restoring data using the refresh method, both the source and destination clusters must have the same token ranges; otherwise, it can cause issues.

Is this requirement version-specific, or does it apply to all versions of Cassandra?

I found this reference: https://dba.stackexchange.com/questions/316497/how-do-i-restore-cassandra-snapshots-to-another-cluster-with-identical-configura

I attempted to restore a snapshot to a new cluster with the same configuration and the same number of nodes ,but the token ranges were different. Despite that, I was able to restore the data successfully, and all rows were present in the tables. I'm using Cassandra 4 for both the source and destination clusters.

Is it necessary to have identical token ranges, or does Cassandra 4 handle this differently?

Value of "num_token"=256 in both source and destination clusters in my case.

1 Answer 1

2

You can restore any sstables to any nodes, but it doesn't mean the node will read any data. For example, let's say you restore a sstable with the range 0-10 to a node with a range of 11-20. Then you try to read the data, the coordinator will not even ask the node because it's not supposed to own the range.

In your case, if all of the rows could be read, then you either:

  • Have a 3-node cluster with an rf of 3.
  • You just got very lucky and none of the data fell into ranges that didn't match the owned ranges on nodes.
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the update. So it means it is must to have the same token values in source and destination cluster and for that we need to update Cassandra.cml File with Initial-token parameter with all the tokens present in source cluster. Is this ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.