Skip to content
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

Question: Exponential backoff for DynamoDB would be triggered only if the entire items from a batchWrite() call failed or even if just some items failed? #1262

Closed
develoser opened this issue Dec 12, 2016 · 3 comments
Labels
guidance Question that needs advice or information.

Comments

@develoser
Copy link

Got a question about DynamoDB.batchWrite(), the SDK exponential backoff is only triggered when the whole batch of items failed or it would be also triggered even when just a few items failed to be written?

I saw this previous questions and realized the SDK can handle retries, but is not clear to me if it handles all scenarios:

a) all items failed
b) just some items failed

I wanna know if I need to write my own exponential backoff handler when the batchWrite() returns some "UnprocessedItems", in order to do not end up coding what the SDK already does or to lose UnprocessedItems assuming the SDK is doing something it is not.

Thanks in advance.

@jeskew
Copy link
Contributor

jeskew commented Dec 12, 2016

The SDK will only retry requests that fail with a status code of 429 or 500 or greater. If only some writes in a batch failed, the request is considered by the service to have succeeded and is therefore not retried.

Retrying items in the UnprocessedItems list in the response would need to be handled in the code that is calling batchWrite.

@develoser
Copy link
Author

Thank you so much, it's clear now.

@srchase srchase added guidance Question that needs advice or information. and removed Question labels Jan 4, 2019
@lock
Copy link

lock bot commented Sep 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants