Search code examples
cassandracqlcassandra-2.0cql3cqlsh

Cassandra cluster old data is not replicated in new node


I installed apache cassandra on my local system for testing purpose. With 1 system (1 node) i was able to read/write and query in the database. I added another node and created a cluster. Now the data that I write on my system is replicated on other node and vice versa, but the data which was present on my system earlier to the addition of new node is not replicated. Though the Keyspaces and Tables are present on new node but they are empty. Did I do something wrong while adding the new node to the cluster?


Solution

  • My best guess is that you have auto_bootstrap turned off (it is ON by default). From the documentation:

    auto_bootstrap (Default: true ) This setting has been removed from default configuration. It makes new (non-seed) nodes automatically migrate the right data to themselves. When initializing a fresh cluster with no data, add auto_bootstrap: false.

    The easiest way to fix this is to run a repair on the node which will ensure that it gets any data it's missing.

    http://www.datastax.com/documentation/cassandra/2.0/cassandra/operations/ops_repair_nodes_c.html