You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to have consistent read, read request need to be forwarded to leader node.
Also leader node need to verify it is still the leader using the code below.
You're right. Going forward I'll make the read consistency configurable along the same lines as suggested in the OP on a similar issue in etcd (see here). This will mean that the user can opt for consistent reads or potentially stale reads.
Resolved by db4aec0. The leader now verifies that it is still the leader before accepting any writes and reads now have three consistency options: "Any" (potentially stale but faster), "Leader" (no network round trip done to verify it is still leader) and "Consistent", which means that the read is done via Raft leader which checks it is still the leader before replying.
In order to have consistent read, read request need to be forwarded to leader node.
Also leader node need to verify it is still the leader using the code below.
if err := raft.VerifyLeader().Error(); err != nil {
return err
}
The text was updated successfully, but these errors were encountered: