Doesn't Cassandra do "late" replication when node is over and over?

I have a 2-node Cassandra cluster. The replication factor is 2. The client only sends data to node 1. If both nodes are up, the data is replicated from node 1 to node 2. However, if I start only node 1 first, the client sends data to node 1 and then stops sending data. After that I start node 2. I expect the data to be "late" (or asynchronously) replicated from node 1 to node 2, but it is not. How can I customize this?

My Cassandra version is 2.1.6.

+1


source to share


2 answers


Whenever a node shuts down when a write occurs, which means it skips saving data, the coordinator will keep a "hint" so that the node gets the data as soon as it comes back online.

This hint doesn't stay forever and will be discarded if the node is too long. You can adjust this time using max_hint_window_in_ms in the cassandra.yaml file. I believe the default is 3 hours. Increasing this timeout may solve your problem.



Otherwise, the conflict will be resolved by restoring the read when that row of data is requested. If you set the read consistency to a sufficient level, then this will be resolved before the result is returned to the client.

http://docs.datastax.com/en/cassandra/2.0/cassandra/dml/dml_about_hh_c.html

+1


source


You must first set max_hint_window_in_ms. Second, you need to set the token on both machines, if at the time of input the key token does not find the correct cassandra node, then it will go to another node. If you have two node clusters then also create both nodes as node seeds.



0


source







All Articles