-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws/request: Reorganize retry behavior to reduce separation #2744
Conversation
Reorganizes the SDK's retry utilities to follow a consistent code path. Request.IsErrorRetryable is the primary entry pointer for determining if a request error should be retryable instead of split between Request.Send and DefaultRetryer calling IsErrorRetryable. This also gives the implementation of the Retryer interface consistent control over when a request will be retried. Also adds support for request and service specific API error retry and throttling to be enabled by specifying API error codes before a request is sent. The "RetryCodes" and "ThrottleCodes" members were added to request.Request struct. These are used by the Request's IsErrorRetryable and IsErrorThrottle respectively to specify additional API error codes that identify the failed request attempt as needing to be retried or throttled. The DefaultRetryer uses both of these methods when determining if a failed request attempt should be retried. Related to aws#1376
8581876
to
86c3e37
Compare
@jasdel when we wrap the aws clients My question is - are we using this helper function incorrectly on our side? |
Thanks for reporting this issue @thastings3. I created #2773 to track this bug. Passing nil into |
Ports v1 SDK's retry utilities to follow a consistent code path. aws.IsErrorRetryable is the primary entry point to determine if a request is retryable. Also ports support for service/kinesis to retry service specific API errors . Corrects sdk's behavior by not retrying errors with status code 501. Related to aws/aws-sdk-go#2744, aws/aws-sdk-go#2774, aws/aws-sdk-go#2751 and aws/aws-sdk-go#1826 Fixes #372; Fixes #145
Reorganizes the SDK's retry utilities to follow a consistent code path.
Request.IsErrorRetryable is the primary entry pointer for determining if
a request error should be retryable instead of split between
Request.Send and DefaultRetryer calling IsErrorRetryable. This also
gives the implementation of the Retryer interface consistent control
over when a request will be retried.
Also adds support for request and service specific API error retry and
throttling to be enabled by specifying API error codes before a request
is sent. The "RetryErrorCodes" and "ThrottleErrorCodes" members were added to
request.Request struct. These are used by the Request's IsErrorRetryable
and IsErrorThrottle respectively to specify additional API error codes
that identify the failed request attempt as needing to be retried or
throttled. The DefaultRetryer uses both of these methods when
determining if a failed request attempt should be retried.
Related to #1376
TODO