Add preview of changes for standard retry mode behind flag#3400
Open
Madrigal wants to merge 3 commits into
Open
Add preview of changes for standard retry mode behind flag#3400Madrigal wants to merge 3 commits into
Madrigal wants to merge 3 commits into
Conversation
lucix-aws
reviewed
Apr 30, 2026
| // that time. Potentially early exist if the sleep is canceled via the | ||
| // context. | ||
| retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err) | ||
| retryDelay, reqErr := r.retryer.RetryDelay(attemptNum-1, err) |
lucix-aws
reviewed
Apr 30, 2026
| if newRetries2026() { | ||
| longPolling := false | ||
| if std, ok := r.retryer.(*Standard); ok { | ||
| longPolling = std.IsLongPolling() |
Contributor
There was a problem hiding this comment.
do we need both the option and the wrap? it seems like this is just a fact of certain operations so i'm not sure why we'd make it configurable
lucix-aws
reviewed
Apr 30, 2026
| // WithBaseDelay sets the base delay for non-throttle errors. | ||
| func WithBaseDelay(d time.Duration) ExponentialJitterBackoffOption { | ||
| return func(j *ExponentialJitterBackoff) { | ||
| j.baseDelay = d |
Contributor
There was a problem hiding this comment.
- am i reading correctly that this and WithThrottleCheck won't be used unless they're in the 2026 path
- this is only used as a vehicle to customize ddb's values, right? could it be internalized? i don't want to add to the retry API surface unless we absolutely have to
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 preview of new standard retry behavior behind
AWS_NEW_RETRIES_2026flag.All changes are gated behind the
AWS_NEW_RETRIES_2026environment variable and have no impact on existing behavior unless the flag is explicitly set to "true". This feature is expected to be enabled by default later in the year.This is part of a cross-SDK change to standardize how we handle retries, and will be implemented by all AWS SDKs (Java, Python, Rust, etc.)
Changes
Retry token bucket costs
allows more retries when a service explicitly signals "try again later."
Backoff timing
transient failures.
x-amz-retry-after header
milliseconds.
Long-polling operations
ReceiveMessage, SFNGetActivityTask, SWFPollForActivityTask/PollForDecisionTask, but will be implemented as a trait on the service) now back off even when the retry quota is exhausted, preventing request amplification on polling endpoints.hardcoded fallback for known operations until the trait is widely applied.
Attempt token bookkeeping
counting when the retry token is also refunded on success.
Backwards compatibility
identically to before this change.
wrapper; NewExponentialJitterBackoffWithOptions) is additive only.
Testing
basic retries, max attempts, quota exhaustion, quota recovery, exponential backoff, max backoff, throttling
costs, DynamoDB-specific config, long-polling backoff, x-amz-retry-after header (valid, min-clamped, max-clamped,
invalid), long-polling with throttle errors, and non-retryable errors.