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 the transaction again after configured time when too much contention occurs #203

Open
akreddy21 opened this issue Sep 20, 2018 · 2 comments

Comments

@akreddy21
Copy link

Hi,
I know that when two or more threads trying to update same entity with transaction leads to too much contention exception. Is there anyway to retry the transaction again instead of throwing exception back to client.

Thanks

@sai-pullabhotla
Copy link
Owner

@akreddy21 - you should be able to implement your own retry logic as explained below. I will see if this can be added to the framework in a future release.

https://cloud.google.com/datastore/docs/concepts/transactions#uses_for_transactions

@akreddy21
Copy link
Author

If I use the logic that google has provided in docs, I will end up in writing boiler plate code to put every method in while loop or I have to use AOP to manage this at one place. It will be helpful if framework can provide this feature with configurations in TransactionOptions like no-of-times, intialDelay..

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

No branches or pull requests

2 participants