You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz Wo Nicholas Sze (JIRA)" <ji...@apache.org> on 2018/12/19 03:34:00 UTC

[jira] [Created] (RATIS-459) Async requests may become out-of-order in some rare case

Tsz Wo Nicholas Sze created RATIS-459:
-----------------------------------------

             Summary: Async requests may become out-of-order in some rare case
                 Key: RATIS-459
                 URL: https://issues.apache.org/jira/browse/RATIS-459
             Project: Ratis
          Issue Type: Improvement
          Components: client
            Reporter: Tsz Wo Nicholas Sze
            Assignee: Tsz Wo Nicholas Sze


With some discussion with [~ljain] (thanks!), the following (highly unlikely) hypothetical scenario may lead to the async requests out-of-order.
# Requests r1-r5 success, 
# Request r6 fails with NotLeader, 
# Request r7 fails with some other IOException
# 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)