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

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

bq. If a state machine implementation can service read requests without logging 
to the Server, this notification would help prevent an old leader from 
servicing any new requests.

We already have LeaderEventApi.notifyNotLeader(..) when the server is the 
Leader and it steps down.

BTW, for prevent the old leader servicing new read requests, set 
raft.server.read.option to LINEARIZABLE.  This is a relatively new feature.

> Notify StateMachine of Server State change
> ------------------------------------------
>
>                 Key: RATIS-297
>                 URL: https://issues.apache.org/jira/browse/RATIS-297
>             Project: Ratis
>          Issue Type: Improvement
>            Reporter: Hanisha Koneru
>            Assignee: Rui Wang
>            Priority: Major
>              Labels: ozone
>
> This Jira proposes to add support for notifying the state machine whenever 
> the server state changes.
> This would help the state machine to immediately discover whenever there is a 
> state change on its server.
> If a state machine implementation can service read requests without logging 
> to the Server, this notification would help prevent an old leader from 
> servicing any new requests.
> Whenever there is a state change on the server, it should notify its state 
> machine of this change.



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

Reply via email to