You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current retry mechanism only supports a single retry policy for a successful/erroneous result of a given operation, which can only be customized by providing a ResultPolicy that allows for re-defining success or failing fast on given errors. The limitation of this approach is that it doesn't support different retry strategies for different types of errors.
We'd like to be able to define a multi-policy, i.e. one that assigns different retry strategies to different errors, so that e.g. we retry immediately for some errors, but use exponential backoff for others.
A multi-policy could be thought of as a total function E => RetryPolicy, where E is the error type for the operation, e.g.
One thing to consider is whether we want a notion of "failing fast" within the multi-policy - since it can already be handled by a ResultPolicy(isWorthRetrying = _ => false). Allowing to define it within a multi-policy as well - although possibly useful - might introduce ambiguity.
The text was updated successfully, but these errors were encountered:
@adamw.andThen is used for combining multiple schedules (for example use a schedule A for first 3 retries, then B for another 4 retries and schedule C for remaining retries)
And this issue seems to be about changing RetryConfig based on error returned by an operation.
The current retry mechanism only supports a single retry policy for a successful/erroneous result of a given operation, which can only be customized by providing a
ResultPolicy
that allows for re-defining success or failing fast on given errors. The limitation of this approach is that it doesn't support different retry strategies for different types of errors.We'd like to be able to define a multi-policy, i.e. one that assigns different retry strategies to different errors, so that e.g. we retry immediately for some errors, but use exponential backoff for others.
A multi-policy could be thought of as a total function
E => RetryPolicy
, whereE
is the error type for the operation, e.g.One thing to consider is whether we want a notion of "failing fast" within the multi-policy - since it can already be handled by a
ResultPolicy(isWorthRetrying = _ => false)
. Allowing to define it within a multi-policy as well - although possibly useful - might introduce ambiguity.The text was updated successfully, but these errors were encountered: