Reputation: 71
Consider three nodes(A,B,C) getting key/value data. And the following steps happened
How does log matching happen at this time. Is node Bgoing to commit that entry or going to discard it. If it is going to commit thenit would be read inconsistent or if it is going to discard then there could be data loss in other cases
Upvotes: 2
Views: 2491
Reputation: 1928
The error is in step 8. Every read operation must be replicated to other nodes otherwise you risk getting stale data, the system should serve read after it writes a dummy value to the log. In your case (B
is offline), the "read" must affect nodes A
and C
, so when node B
comes back online and A
dies, C
would be able to invalidate B
's records.
This is a tricky problem and even Etcd run into it in the past (now it's fixed).
Upvotes: 7