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
fix: transaction retry could fail if tx contained failed statements #688
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Transaction retries in the Connection API / JDBC driver could fail if the following happened: 1. The initial transaction contains a statement that returns an error that does not invalidate the transaction, such as for example a "Table not found" error, and that error is caught and handled by the application code. 2. The retry attempt tries to execute the failed statement to verify that the statement still returns the same error. If however the transaction that is used by the retry has been aborted immediately before the execution of this statement, the statement will now return Aborted instead of the original error. That would be seen as a different error than the initial error and would fail the retry attempt. When the above happens, the Aborted error in the retry should be propagated and the retry attempt should be restarted. Fixes #685
google-cla
bot
added
the
cla: yes
This human has signed the Contributor License Agreement.
label
Dec 8, 2020
product-auto-label
bot
added
the
api: spanner
Issues related to the googleapis/java-spanner API.
label
Dec 8, 2020
olavloite
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Dec 9, 2020
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Dec 9, 2020
olavloite
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Dec 9, 2020
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Dec 9, 2020
Codecov Report
@@ Coverage Diff @@
## master #688 +/- ##
============================================
+ Coverage 84.12% 84.35% +0.22%
- Complexity 2509 2516 +7
============================================
Files 142 142
Lines 13911 13917 +6
Branches 1323 1323
============================================
+ Hits 11703 11740 +37
+ Misses 1662 1623 -39
- Partials 546 554 +8
Continue to review full report at Codecov.
|
thiagotnunes
approved these changes
Dec 9, 2020
thiagotnunes
pushed a commit
that referenced
this pull request
May 6, 2021
…688) Transaction retries in the Connection API / JDBC driver could fail if the following happened: 1. The initial transaction contains a statement that returns an error that does not invalidate the transaction, such as for example a "Table not found" error, and that error is caught and handled by the application code. 2. The retry attempt tries to execute the failed statement to verify that the statement still returns the same error. If however the transaction that is used by the retry has been aborted immediately before the execution of this statement, the statement will now return Aborted instead of the original error. That would be seen as a different error than the initial error and would fail the retry attempt. When the above happens, the Aborted error in the retry should be propagated and the retry attempt should be restarted. Fixes #685
ansh0l
pushed a commit
to ansh0l/java-spanner
that referenced
this pull request
Nov 10, 2022
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#4904 Changes: chore: regenerate API index Source-Link: googleapis/googleapis@0cfe2ce feat: publish AllocationEndpoint v1alpha API artifacts PiperOrigin-RevId: 399552457 Source-Link: googleapis/googleapis@3ec255e feat(aiplatform): add vizier service to aiplatform v1 BUILD.bazel Committer: @dizcology PiperOrigin-RevId: 399538263 Source-Link: googleapis/googleapis@70d5a82 feat(contactcenterinsights): add metadata from dialogflow related to transcript segment feat: add sentiment data for transcript segment feat: add obfuscated if from dialogflow PiperOrigin-RevId: 399513805 Source-Link: googleapis/googleapis@0766e6d chore: regenerate API index Source-Link: googleapis/googleapis@47b2171 fix(ruby)!: Fix Ruby namespace for videointelligence/v1p3beta1 PiperOrigin-RevId: 399448269 Source-Link: googleapis/googleapis@f75ccc2 docs(monitoring/metricsscope): update product documentation url for monitoring metrics scopes PiperOrigin-RevId: 399443900 Source-Link: googleapis/googleapis@6ce857f
rajatbhatta
pushed a commit
to rajatbhatta/java-spanner
that referenced
this pull request
Nov 17, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: spanner
Issues related to the googleapis/java-spanner API.
cla: yes
This human has signed the Contributor License Agreement.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Transaction retries in the Connection API / JDBC driver could fail if the following happened:
the transaction, such as for example a "Table not found" error, and that error is caught and
handled by the application code.
returns the same error. If however the transaction that is used by the retry has been aborted
immediately before the execution of this statement, the statement will now return Aborted
instead of the original error. That would be seen as a different error than the initial
error and would fail the retry attempt.
When the above happens, the Aborted error in the retry should be propagated and the retry attempt should be restarted.
Fixes #685