googleapis / googleapis/google-cloud-java

Update Jitter in Exponential Retry Strategy

オープン
#9,102 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
priority: p4 type: feature request
主要言語
Java
スター
2.1k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
154

説明

**Is your feature request related to a problem? Please describe.**
In Exponential Retry Strategy, Jitter is used to prevent from several clients retrying at the same time.
However, the [existing jitter](http://googleapis.github.io/gax-java/1.8.0/apidocs/com/google/api/gax/retrying/RetrySettings.Builder.html#setJittered-boolean-) value is generated per:

```
actualDelay = rand_between(0, min(maxRetryDelay, exponentialDelay))
```

The issue with the delay is with pathological case of a short delay, e.g. 1 second.

**Describe the solution you'd like**
It would help to update jitter delay to be either one of the following:

1. `actualDelay = exponentialDelay + rand_milliseconds()`
2. `actualDelay = rand_between(exponentialDelay - E, exponentialDelay + E)` where E is constant value used to create a range with respect to exponentialDelay.

**Describe alternatives you've considered**
Turning off jitter which defeats the purpose of having jitter.

First came up in: https://github.com/googleapis/java-storage/issues/178

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。