Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend retryablehttp limits in SDK base client
Explicitly set three fields in the `retryablehttp.Client` struct. `RetryWaitMin` is the shortest wait time before attempting to retry the request, and is the same as the default, but set explicitly here for clarity. `RetryWaitMax` is the longest wait time before attempting to retry the request. The default is 30 seconds, we extend this to 61 second in consideration of potential API throttling for especially long-lasting eventual consistency issues. `RetryMax` is the maximum number of retries for a given API request, and is given the most consideration here. The default is 4, which is far too little for our purposes. Here, we set it to 16, which in conjunction with the above two field values, and when implemented using an exponential backoff algorithm, should take approximately 10 minutes to exhaust. However, in consideration of _really_ long lasting retries, we inspect the context and increase this if it looks like the retries will be exhausted before the context deadlines. The goal is to try and deadline the context just before the retries are exhausted. For compatibility, since we don't strictly require a deadline to execute a request, we don't require one here.
- Loading branch information