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

Async requests may become out-of-order in some rare case

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.3.0
    • client, gRPC, server

    Description

      With some discussion with ljain (thanks!), the following (highly unlikely) hypothetical scenario may lead to the async requests out-of-order.

      1. Requests r1-r5 success,
      2. Request r6 fails with NotLeader,
      3. Request r7 fails with some other IOException
      4. r6 is still keeping retrying and a retry of r7 succeeds with s1.

      Below are the suggested fix:

      • In SlidingWindow.Client, resetFirstSeqNum() should, but currently does not, clear the request map.
      • If a request is replied with NotLeaderException, it should not be removed from the request map until resetFirstSeqNum() above.

      Attachments

        1. r459_20190222.patch
          14 kB
          Tsz-wo Sze
        2. r459_20190227.patch
          14 kB
          Tsz-wo Sze
        3. r459_20190228.patch
          16 kB
          Tsz-wo Sze
        4. r459_20190228b.patch
          29 kB
          Tsz-wo Sze
        5. r459_20190308.patch
          31 kB
          Tsz-wo Sze
        6. r459_20190311.patch
          31 kB
          Tsz-wo Sze
        7. r459_20190311b.patch
          31 kB
          Tsz-wo Sze

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              szetszwo Tsz-wo Sze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: