-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Add retries for Kinesis throttling exceptions #1085
Conversation
Ideally the AWS SDK would automatically retry these transient throttling exceptions, but it is currently unable to b/c the service is incorrectly using LimitExceededException for throttling. See aws/aws-sdk-go#1376 for additional details.
Hey @cbroglie thanks for the patch here. I'm curious if you're open to a different idea here, one that does involve more code, but I think it becomes more obvious to contributors down the road. I'm curious if instead of doing this in
My reasoning is to try and avoid future developers from seeing automatic retries they are not expecting, because they are not explicitly catching and retrying these rate limits here in the traditional I feel like this approach makes it much more explicit that the SDK is being leveraged here. The drawback is that this approach involves more code and each method that uses a Kinesis connection would have to opt-in to it, but I feel the element of least surprise is a winning feature. What do you think? |
@catsby I agree with the sentiment that it's best to do the least surprising thing, even if it involves more code. The reason I think I still prefer my original approach is that I feel these are retries that the SDK should be performing automatically, and based on the discussion in aws/aws-sdk-go#1376, I'm hopeful future versions of it will. Therefore I believe it's best to implement the retries now using the same exact mechanism that the SDK will later utilize, so there is no behavior change when it happens. |
@catsby @apparentlymart Any updates on this? Our environment uses 30+ Kinesis streams and we cannot successfully run terraform without this patch. |
I'll go ahead and merge this change, thank you! Test:
|
Thanks! |
The AWS Go SDK now automatically retries on this error. References: - aws/aws-sdk-go#1376 - #1085 - aws/aws-sdk-go#2751 - #9770 Output from acceptance testing: ``` --- PASS: TestAccAWSKinesisStream_createMultipleConcurrentStreams (205.83s) ```
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Ideally the AWS SDK would automatically retry these transient throttling exceptions, but it is currently unable to b/c the service is incorrectly using LimitExceededException for throttling.
See aws/aws-sdk-go#1376 for additional details.
See hashicorp/terraform#15482 for the original PR.