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

Tsz-wo Sze commented on RATIS-614:
----------------------------------

Thanks [~ljain].  Some comments on the patch
- In BaseStateMachine, let's remove initLastAppliedTermIndex() and move the 
code to the constructor.
- The change of SimpleStateMachine4Testing is not needed since it will invoke 
the BaseStateMachine constructor.
- Change StateMachineUpdater.getLastAppliedIndex() to private


> 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
>
>
> 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 applied whereas StateMachineUpdater's 
> lastAppliedIndex denotes the index till which the applyTransaction call has 
> already been made.



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

Reply via email to