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

AsyncApi#send() is not handling retry and reply correctly for replication levels higher than MAJORITY

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.1.0
    • server
    • None

    Description

      RATIS-1994 adds a feature allowing AsyncApi#send() to return only when a specified replication level is reached. This was done by adding waitForReplication() in RaftServer.

      However, two bugs are found with RATIS-1994 when the (write) replication level is set to higher than MAJORITY (the default):

      1. When the request is retried (e.g. when timed out), the future retrieved from cache is not correctly waited on with waitForReplication() again. This causes divergence in the desired behavior depending on if the request is retried or not. This is fixed by invoking waitForReplication() in writeAsync() rather than appendTransaction().

      2. waitForReplication()'s watch request reply was incorrectly ignored, this is fixed by combining the reply from write and watch together using combineReplies()

      Attachments

        Issue Links

          Activity

            People

              smeng Siyao Meng
              smeng Siyao Meng
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 0.5h
                  0.5h