Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-1262

Support linearizable read

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Linearizable Read
    • 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

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              yjxxtd runzhiwang
              yjxxtd runzhiwang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 9h
                  9h