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

Retry transactions on conflict #90

Merged
merged 5 commits into from
Feb 28, 2023

Conversation

tachyonics
Copy link
Contributor

Issue #, if available:

Description of changes:

  1. Adds the ability to retry with exponential backoff when there is a conflict with a transaction. This will allow the transaction to succeed or fail with another error such as DuplicateItem.
  2. Adds the ability to optionally provide a AWSDynamoDBTableMetrics instance; within this instance a Metrics.Recorder can be provided to record the number of retries.

Verified the change with concurrent transactions that attempt to create the same row. As expected, the transaction first fails with a conflict and then fails on the retry with DuplicateItem.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@tachyonics tachyonics merged commit 757987a into smoke-dynamodb-3.x Feb 28, 2023
@tachyonics tachyonics deleted the transaction_conflict_retry branch February 28, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants