I have a cassandra 2 node cluster with a replication rate of 2 and AutoBootStrap = true. Everything is fine during startup, and both nodes see each other. Call these nodes A and B.
- Add a set of keys and columns (allows you to call this set of K1) in cassandra via node A.
- Connect to node A and press K1 back. Same thing on node B. Success is good
- Kill the Cassandra process on node B.
- Add set K2 through A.
- Connect to node A and read the K2 suite. Good
- Restart the Cassandra process on node B.
- Try to read all the keys from B ... install K1, install K2 MISSING. (Even after 30 minutes).
- Add K3 to A / B.
- Read all keys from A - returns K1, K2, K3
- Read all keys from B - returns K1, K3.
B never synchronizes the K2 set ... (Its more than 12 hours) Why does node B not see the K2 set ... who has any ideas?
Information added :
Well ... that was the problem. By default, read_consistency_level was set to 1.
Therefore, when we ask node B for the set K2, and it does not have it (when it is assumed due to the replication coefficient = 2), it immediately returns with the error βNot foundβ.
However, if we use read consistency of QUORUM or ALL, then B is forced to ask A, which then returns the correct value, and B synchronizes this key (stores it locally).
This leads to another problem. This means that when node B appears, it does not synchronize all the data from node A even after a long time. Now, if node A is omitted, how can we access this unsynchronized data? (I just checked that we cannot)
I suppose there should be a way to force data synchronization. I see INFO in the terminal output that the intended 15-line handover from A to B occurred when B went up, but B does not have these lines locally (because we still cannot read it with B with ONE consistency level). What is going on here?
cassandra replication
Rajan
source share