-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.x: Introduce exponential retry backoff policy #483
base: scylla-4.x
Are you sure you want to change the base?
4.x: Introduce exponential retry backoff policy #483
Conversation
798c52b
to
ba056bb
Compare
Make driver wait before retry. It is needed to mitigate retry storms that can happen in certain cases.
ba056bb
to
af7f1b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation in multiple places is not adjusted to describe the new implementations. Often it refers to other existing classes or interfaces and does not list newly added params.
Is it necessary to introduce a new separate category of retry policies? I think from the user perspective it may be hard to understand how does the RetryPolicy
interact with BackOffRetryPolicy
.
Ideally the new retry policy should be just an implementation of RetryPolicy
interface.
/** The class of the retry policy. */ | ||
public static final TypedDriverOption<String> BACKOFF_RETRY_POLICY_CLASS = | ||
new TypedDriverOption<>(DefaultDriverOption.BACKOFF_RETRY_POLICY_CLASS, GenericType.STRING); | ||
/** The class of the retry policy. */ | ||
public static final TypedDriverOption<Integer> BACKOFF_RETRY_BASE_BACKOFF_MS = | ||
new TypedDriverOption<>( | ||
DefaultDriverOption.BACKOFF_RETRY_BASE_BACKOFF_MS, GenericType.INTEGER); | ||
/** The class of the retry policy. */ | ||
public static final TypedDriverOption<Integer> BACKOFF_RETRY_MAX_BACKOFF_MS = | ||
new TypedDriverOption<>( | ||
DefaultDriverOption.BACKOFF_RETRY_MAX_BACKOFF_MS, GenericType.INTEGER); | ||
/** The class of the retry policy. */ | ||
public static final TypedDriverOption<Double> BACKOFF_RETRY_JITTER_RATIO = | ||
new TypedDriverOption<>(DefaultDriverOption.BACKOFF_RETRY_JITTER_RATIO, GenericType.DOUBLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Descriptions here look incorrect
It is definitely easier, I will try to make it part of regular retry |
Make driver wait before retry.
It is needed to mitigate retry storms that can happen in certain cases.
Fixes: #481