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 2019/02/23 01:24:00 UTC

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

    [ https://issues.apache.org/jira/browse/RATIS-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16775730#comment-16775730 ] 

Tsz Wo Nicholas Sze commented on RATIS-459:
-------------------------------------------

Discussed with [~jnp] today.  We may add a flag to RaftClientRequest for indicating if the request is the first in the SlidingWindow.  Then, the server won't process r7 in the example in the description since the flag won't be set for r7.  The server will wait for the first request.



> 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
>            Priority: Major
>              Labels: ozone
>
> 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)