Search code examples
cassandradistributed-systemdata-consistencynosql

Verifying data consistency between data centers in cassandra


I maintaining a cassandra cluster with 2 data centers. Now I am going to add new data center in that existing cluster. After rebuilding data, how can i verify the consistency of data in new data center?


Solution

  • Read with LOCAL_QUORUM from each DC and compare be most straight forward.

    A repair builds a hash of partitions from the sstables in a compaction task and compares ranges of them which is more efficient than reading data individually. You could just pull that part out of code to build a tool to do same thing... or if you can just run a (full not incremental) repair. It logs about differences it finds.