Skip to content

Commit

Permalink
control (internal): Use Jittering by default in Retry (#3023)
Browse files Browse the repository at this point in the history
Adding randomness to the retry wait interval, called Jittering, is a
better behavior in distributed systems so as not to create synthetic
retry patterns between multiple programs accessing the same API.
  • Loading branch information
xerial authored Jun 16, 2023
1 parent 50b8b33 commit 8fbcb4d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ object Retry extends LogSupport {
lastError = NOT_STARTED,
retryCount = 0,
maxRetry = 3,
retryWaitStrategy = new ExponentialBackOff(retryConfig),
retryWaitStrategy = new Jitter(retryConfig),
nextWaitMillis = retryConfig.initialIntervalMillis,
baseWaitMillis = retryConfig.initialIntervalMillis,
extraWaitMillis = 0
Expand Down

0 comments on commit 8fbcb4d

Please sign in to comment.