Ashish
Ashish

Reputation: 41

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?

Upvotes: 2

Views: 3553

Answers (3)

mildewey
mildewey

Reputation: 413

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

Upvotes: 1

Uttam Kasundara
Uttam Kasundara

Reputation: 237

If you have correct seeds and replication settings. But still the data is not getting replicated to new data center. Please perform nodetool repair with -full option will replicate data to the new datacenter node.

Upvotes: 0

user3183457
user3183457

Reputation: 97

Simply run this on new node if the data on it is not up-to-date.

Run $CASSANDRA_HOME/bin/nodetool rebuild

Login as cqlsh and verify that new node has received the data.

Also look into below -

http://docs.datastax.com/en/cassandra/2.0/cassandra/operations/ops_add_dc_to_cluster_t.html

Upvotes: 0

Related Questions