4.x: Introduce exponential retry backoff policy#483
4.x: Introduce exponential retry backoff policy#483dkropachev wants to merge 1 commit intoscylladb:scylla-4.xfrom
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
Bouncheck
left a comment
There was a problem hiding this comment.
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); |
It is definitely easier, I will try to make it part of regular retry |
| startedSpeculativeExecutionsCount.incrementAndGet(); | ||
| // Note that `node` is the first node of the execution, it might not be the | ||
| // "slow" one if there were retries, but in practice retries are rare. |
There was a problem hiding this comment.
I don't understand why speculative executions count is increased here. Is this method only for SpecEx queries?
0666b08 to
de10f2f
Compare
1979ab1 to
a4e60af
Compare
Make driver wait before retry.
It is needed to mitigate retry storms that can happen in certain cases.
Fixes: #481