You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Song Ziyang (Jira)" <ji...@apache.org> on 2022/10/03 11:13:00 UTC

[jira] [Commented] (RATIS-1716) Retry linearizable read when leader steps down

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

Song Ziyang commented on RATIS-1716:
------------------------------------

[~szetszwo] When read-only request fails with NotLeaderException, client side should retry. Currently in sync client, it would throw the exception out, as [https://github.com/apache/ratis/blob/3bc72c6f383b723f545c52c25e3ea2ea5be0aac1/ratis-client/src/main/java/org/apache/ratis/client/impl/BlockingImpl.java#L148|https://github.com/apache/ratis/blob/3bc72c6f383b723f545c52c25e3ea2ea5be0aac1/ratis-client/src/main/java/org/apache/ratis/client/impl/BlockingImpl.java#L148.]. To implement retry, should we change the logic here? Since user can assign a RetryPolicy to the client and handle situations like NotLeaderException, should we leave the retry decision to RetryPolicy or add a default rule to RetryPolicy implementation?

> Retry linearizable read when leader steps down
> ----------------------------------------------
>
>                 Key: RATIS-1716
>                 URL: https://issues.apache.org/jira/browse/RATIS-1716
>             Project: Ratis
>          Issue Type: Sub-task
>          Components: client
>            Reporter: Song Ziyang
>            Priority: Major
>
> When linearizable read only request fails due to NotLeaderException or LeaderNotReadyException, client should retry the operation so that the request won't fail.



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