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 2018/07/04 15:07:00 UTC

[jira] [Commented] (RATIS-252) Add API to state machine for determining server role

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

Lokesh Jain commented on RATIS-252:
-----------------------------------

[~szetszwo] Thanks for working on this! The patch looks very good to me. Please find my comments below:
 # RaftServer.java:28 - unused import
 # SimpleStateMachine4Testing:26 - unused import
 # StateMachine: 20, 24 - unused import
 # I have one concern regarding a race condition. It might be possible for leader to step down after its lastCommittedIndex has been updated but before transaction has been applied to the state machine. In such a case it might happen that the applyTransaction for all servers get a role of FOLLOWER?

> Add API to state machine for determining server role
> ----------------------------------------------------
>
>                 Key: RATIS-252
>                 URL: https://issues.apache.org/jira/browse/RATIS-252
>             Project: Ratis
>          Issue Type: New Feature
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>            Priority: Major
>         Attachments: r252_20180629.patch
>
>
> In some applications, the state machine may update external database/systems while applying a transaction.  When there are multiple servers in a raft group, all servers will submit the same update to the external systems.  It unnecessarily overloads the external system.  Ideally, only the leader should send the update and the followers should not.
> In this JIRA, we provide an API so that the state machine can query its server role in order to determine if it should send the update.



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