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

Shashikant Banerjee commented on RATIS-835:
-------------------------------------------

[~ljain], thanks for reporting and working on this. Would it make more sense to 
maintain the exception based attempt count inside the exception dependent retry 
policy class itself instead of clientRetryEvent as it is very specific to this 
policy ?
. Every time the exception policy is inquired to get the retry policy for an 
specific exception, the attempt count can be increased or when anytime 
shouldRetry() returns true, the attempt counter of that specific exception 
inside the exceptionDependentRetryPolicy map can be increased.

> Include exception based attempt count in raft client request
> ------------------------------------------------------------
>
>                 Key: RATIS-835
>                 URL: https://issues.apache.org/jira/browse/RATIS-835
>             Project: Ratis
>          Issue Type: Bug
>          Components: client
>            Reporter: Lokesh Jain
>            Assignee: Lokesh Jain
>            Priority: Major
>         Attachments: RATIS-835.001.patch, RATIS-835.002.patch, 
> RATIS-835.003.patch
>
>
> Client needs to maintain exception based attempt count for using Exception 
> Dependent retry policy. Exception dependent policy helps in specifying 
> individual policies for different exception types.
> Currently policy takes number of attempts as argument. Therefore the 
> individual policies require attempt counts for the particular exception while 
> handling retry event. This is particularly important for using 
> MulipleLinearRandomRetry policy which increases sleep interval based on 
> number of attempts made by the client. Raft Client can therefore use this 
> policy for ResourceUnavailableException and increase sleep interval for 
> subsequent retries of the request on the same exception.



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

Reply via email to