You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Lokesh Jain (Jira)" <ji...@apache.org> on 2019/11/04 08:38:00 UTC

[jira] [Updated] (RATIS-614) Raft leader should use state machine's last applied index for LeaderNotReady exception

     [ https://issues.apache.org/jira/browse/RATIS-614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lokesh Jain updated RATIS-614:
------------------------------
    Attachment: RATIS-614.003.patch

> Raft leader should use state machine's last applied index for LeaderNotReady exception
> --------------------------------------------------------------------------------------
>
>                 Key: RATIS-614
>                 URL: https://issues.apache.org/jira/browse/RATIS-614
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Lokesh Jain
>            Assignee: Lokesh Jain
>            Priority: Blocker
>              Labels: ozone
>         Attachments: RATIS-614.001.patch, RATIS-614.002.patch, RATIS-614.003.patch
>
>
> Currently Raft leader uses the StateMachineUpdater's lastAppliedIndex to determine if leader is ready to take requests. It should rather use StateMachine's lastAppliedTermIndex because it denotes the index till which the transactions have already been completed whereas StateMachineUpdater's lastAppliedIndex denotes the index till which the applyTransaction call has been made to the StateMachine.
> Currently the new leader might not have applied all the transactions of the old term. Any reads served on the new leader can be stale.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)