Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
There are two case violate linearizable read, for example, there are 3 servers: server1, server2, server3, and server1 is leader
Case 1. server1: applyIndex = 2, commitIndex = 2, server2: applyIndex = 1, commitIndex = 2. When server1 step down, server2 become leader, and client read from server2,
because server2's applyIndex less than commitIndex, client will read old data.
Case 2. when split-brain happens, server2 was elected as new leader, but server1 still think it's leader, when client read from server1, if server2 has processed write request, client will read old data from server1. As glengeng explained, RATIS-981 still exist dirty-read in server.getMaxTimeoutMs(), i.e. 300ms, if split-brain happens.
etcd / sofa-jraft / pingcap all support linearizable read which has been explained in raft paper, we can implement it in ratis. It's important in Ozone HA.
pingcap's linearizable read: https://en.pingcap.com/blog/lease-read
Attachments
Attachments
Issue Links
- is related to
-
RATIS-1557 Support linearizable read from followers (Read Index)
- Resolved
1.
|
Fix split brain by leader lease | Resolved | runzhiwang |
|