-
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
DynamoDB Create fails to return on error #1271
Comments
Thanks for creating this issue @grubernaut I'm investigating this issue. You're correct that the SDK is treating the error as a throttling which is causing the significant delay before failure. This error shouldn't be treated as a error. |
After a bit of investigation it looks like this exception is returned for both throttling rate limiting conditions as well as total number of tables crated reaches a limit. I think this needs more investigation into how the SDK should handle this error, because I don't think the SDK knows if it can or cannot retry this request without parsing the error message. Paring the error message would be fragile. I'll reach out to the DynamoDB service team to get a better idea how this error should be handled. |
Hey @jasdel, thanks for the responses! Just to note, we're also seeing this issue with Kinesis Firehose Delivery Streams, as noted here: hashicorp/terraform#11143. If there's any other information or debug output needed, please let me know. Thanks for the help on this one :) |
The LimitExceededException error code should not be treated as a throttling condition. This error code implies that resources are exhausted or too many tasks are being attempted at once. The SDK does not have the information it needs to distinguish between the resources exhausted and too many tasks attempted at once. This logic is best implemented by user applications as they will have the most context about what is being attempted. To add custom retry with this error code a custom implementation of the "request.Retryer" interface should be used. Fix aws#1271
Hi @grubernaut I created #1276 to address this issue by removing Since this throttling on +10 create/delete/update concurrent DynamoDB tasks could still fail due to the limit exceeded exception I do not think this would be a breaking change for users as they would need to have logic handling the error code anyways. |
…1276) The LimitExceededException error code should not be treated as a throttling condition. This error code implies that resources are exhausted or too many tasks are being attempted at once. The SDK does not have the information it needs to distinguish between the resources exhausted and too many tasks attempted at once. This logic is best implemented by user applications as they will have the most context about what is being attempted. To add custom retry with this error code a custom implementation of the request.Retryer interface should be used. Fix #1271
Works perfectly, thanks for the quick turnaround on this @jasdel. 🎉 |
Thanks for the update @grubernaut Let us know if you find any additional cases, or have feedback on the SDK! |
Version of AWS SDK for Go?
v1.8.21
Version of Go (
go version
)?go1.8.1
What issue did you see?
When calling
CreateTable()
with correct parameters, the function fails to return if the request would exceed the subscriber limit on the number of tables allowed to be created.We call
CreateTable()
here: https://github.com/hashicorp/terraform/blob/master/builtin/providers/aws/resource_aws_dynamodb_table.go#L321, but the function never returns the400
as expected. Is there a wait inside the request function that doesn't return within ~10s?Expected that the
400
error would be returned so we can handle the error, but the error is never returned.However, I can see that the Create request is retried, instead of returning the error via subsequent
POST
/RESPONSE
debug statements that include the same400
error.Steps to reproduce
255
DynamoDB tablesThanks!
The text was updated successfully, but these errors were encountered: