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

Automatically retry transactions with backoff #1134

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

sorentwo
Copy link
Member

@sorentwo sorentwo commented Aug 8, 2024

Avoid both expected an unexpected database errors by automatically retrying transactions. Some operations, such as serialization and lock not available errors, are likely to occur during standard use depending on how a database is configured. Other errors happen infrequently due to pool contention or flickering connections, and those should also be retried for increased safety.

This change is applied to Oban.Repo.transaction/3 itself, so it will apply to every location that uses transactions.

We don't provide a limit on the size of tags and they could conceivably
be larger than 256 characters. Externally the types are interchangeable,
but internally there are minor advantages to using the text type.
Avoid both expected an unexpected database errors by automatically
retrying transactions. Some operations, such as serialization and lock
not available errors, are likely to occur during standard use depending
on how a database is configured. Other errors happen infrequently due to
pool contention or flickering connections, and those should also be
retried for increased safety.

This change is applied to `Oban.Repo.transaction/3` itself, so it will
apply to every location that uses transactions.

Closes #1132
@sorentwo sorentwo added kind:enhancement New feature or request area:oss Related to Oban OSS labels Aug 8, 2024
@sorentwo sorentwo merged commit bf7f0bf into main Aug 8, 2024
2 checks passed
@sorentwo sorentwo deleted the automatic-transaction-retries branch August 8, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:oss Related to Oban OSS kind:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant