-
Notifications
You must be signed in to change notification settings - Fork 131
fix: safeguard against statement errors when requesting a transaction #800
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #800 +/- ##
============================================
+ Coverage 85.01% 85.09% +0.08%
- Complexity 2562 2564 +2
============================================
Files 143 143
Lines 14015 14030 +15
Branches 1341 1341
============================================
+ Hits 11915 11939 +24
+ Misses 1537 1531 -6
+ Partials 563 560 -3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fixes @olavloite, really appreciate it.
This is an auto-generated regeneration of the .pb.go files by cloud.google.com/go/internal/gapicgen. Once this PR is submitted, genbot will update the corresponding PR to depend on the newer version of go-genproto, and assign reviewers. Whilst this or any regen PR is open in go-genproto, genbot will not create any more regeneration PRs. If all regen PRs are closed, gapicgen will create a new set of regeneration PRs once per night. If you have been assigned to review this PR, please: - Ensure that CI is passing. If it's failing, it requires your manual attention. - Approve and submit this PR if you believe it's ready to ship. That will prompt genbot to assign reviewers to the google-cloud-go PR. Corresponding google-cloud-go PR: googleapis/google-cloud-go#5930 Changes: docs(servicemanagement): fix remaining broken links PiperOrigin-RevId: 443508623 Source-Link: googleapis/googleapis@fd6935f feat(channel): Add new enum value, new filter in ListCustomersRequest of Cloud Channel API PiperOrigin-RevId: 443474187 Source-Link: googleapis/googleapis@d4dd268
Adds a number of safeguards against hanging transactions if the first statement of a transaction for whatever reason fails to return a transaction ID, or otherwise returns an unexpected error. This PR contains the following safeguards:
Throwable
that is not aSpannerException
), the exception will be translated to aSpannerException
and handled as such. This error will mark the transaction as unusable, as the first statement failed to return a transaction.ABORTED
error. This will cause the transaction to be retried automatically.Fixes #799