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

[jira] [Updated] (RATIS-836) It's a waste to send an empty request to check leader state

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

runzhiwang updated RATIS-836:
-----------------------------
    Description: Before send normal request, ratis client will send an [empty request|https://github.com/apache/incubator-ratis/blob/master/ratis-client/src/main/java/org/apache/ratis/client/impl/OrderedAsync.java#L235] to server to check the leader state,  which cost about 5 mill-seconds. I think it can be improved by send normal request directly to server, if the server was not leader, response client with the NotLeaderException. 

> It's a waste to send an empty request to check leader state
> -----------------------------------------------------------
>
>                 Key: RATIS-836
>                 URL: https://issues.apache.org/jira/browse/RATIS-836
>             Project: Ratis
>          Issue Type: Improvement
>            Reporter: runzhiwang
>            Priority: Major
>
> Before send normal request, ratis client will send an [empty request|https://github.com/apache/incubator-ratis/blob/master/ratis-client/src/main/java/org/apache/ratis/client/impl/OrderedAsync.java#L235] to server to check the leader state,  which cost about 5 mill-seconds. I think it can be improved by send normal request directly to server, if the server was not leader, response client with the NotLeaderException. 



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