feat(gax): add jitter knob to RetrySetting#442
Open
op wants to merge 1 commit into
Open
Conversation
Add a jitter knob to RetrySetting but keep it disabled by default.
There was a problem hiding this comment.
Pull request overview
This PR adds an optional “jitter” control to the gcloud-gax retry behavior, while keeping jitter disabled in all default retry settings across clients.
Changes:
- Extend
foundation/gax::RetrySettingwith ajitter: boolknob (defaulting tofalse). - Apply
tokio-retry2’sstrategy::jitterto retry delays when the knob is enabled. - Update service-specific default retry settings to explicitly set
jitter: false.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spanner/src/apiv1/spanner_client.rs | Adds jitter: false to the client’s default RetrySetting literal. |
| spanner/src/admin/mod.rs | Adds jitter: false to the admin default retry setting. |
| kms/src/grpc/apiv1/kms_client.rs | Adds jitter: false to the KMS default RetrySetting literal. |
| foundation/longrunning/src/autogen/operations_client.rs | Adds jitter: false to the longrunning operations default retry setting. |
| foundation/gax/src/retry.rs | Introduces RetrySetting.jitter and applies jitter mapping to retry strategies when enabled. |
| foundation/gax/Cargo.toml | Enables the tokio-retry2 jitter feature to support jittered backoff. |
| bigquery/src/grpc/apiv1/bigquery_client.rs | Adds jitter: false to the BigQuery default RetrySetting literal. |
| artifact-registry/src/grpc/apiv1/artifact_registry_client.rs | Adds jitter: false to the Artifact Registry default RetrySetting literal. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
20
to
+23
| tower = { version = "0.5", features = ["filter", "util"] } | ||
| http = "1.1" | ||
| token-source = "1.0" | ||
| tokio-retry2 = "0.6" | ||
| tokio-retry2 = { version = "0.6", features = ["jitter"] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a jitter knob to RetrySetting but keep it disabled by default.