Siyao Meng created RATIS-2102:
---------------------------------

             Summary: AsyncApi#send() is not handling retry and reply correctly 
for replication levels higher than MAJORITY
                 Key: RATIS-2102
                 URL: https://issues.apache.org/jira/browse/RATIS-2102
             Project: Ratis
          Issue Type: Bug
    Affects Versions: 3.1.0
            Reporter: Siyao Meng
            Assignee: Siyao Meng


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()



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to