Hello, i try to understand RF+CL in an multi-DC example with one replica down (in DC3):
DC1 |
6 nodes: 1 to 6 |
RF=3 |
DC2 |
4 nodes: 7 to 10 |
RF=2 |
DC3 |
3 nodes: 11 to 13 |
RF=1 |
Suppose 1)
A Client writes with consistency LOCAL_ONE to a coordinator node in DC1 who replicates the data to three local nodes and forwards it to some remote coordinators in DC2 and DC3.
Suppose the only one replica in DC3 is down and the coordinator in DC3 stores a hint (in this case: Coordinator node is not the Replica). DC2 should be fine, so two replicas receive the data.
Assumption 1) (write consistency levels in strongest-to-weakest order [1]):
EACH_QUORUM | fails, no ACK from DC3 |
QUORUM | succeeds (4 nodes could ACK) |
LOCAL_QUORUM | succeeds, 2 nodes in DC1 could ACK |
ONE | fails: DC3 could not ACK |
LOCAL_ONE | succeeds, DC1 ACK |
ANY | succeeds |
(With CL=ANY would although succeed on DC3, but all other CL would fail on DC3)
I'm confused because going from strongest-to-weakest changes/switches between failing and succeeding. Is there any mistake in my assumptions in Step 1)?
Suppose 2)
Situation after step 1) would be:
DC1: All 6 nodes up, 3 nodes stores the requested data
DC2: All 4 nodes up, 2 nodes stores the requested data
DC3: Only 2 of 3 nodes up. The former remote coordinator from step 1) still stores the Hint for the down-replica.
Now i am looking to a read to some coordinator node in DC3 with respect to different CL.
Assumption 2) (read consistency levels in strongest-to-weakest order [1])
QUORUM | succeeds since 4 nodes could serve |
LOCAL_QUORUM | fails, no replica in DC3 has the data |
ONE | fails since no replica in DC3 holds the data |
LOCAL_ONE | fails since no replica in DC3 holds the data |
SERIAL | succeeds (*) |
LOCAL_SERIAL | succeeds (*) |
(*) Not sure if i understand SERIAL and LOCAL_SERIAL right...
Here i am confused in the same way. Are my assumptions wrong? Did i understood something completely wrong?
[1] https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html