Conversation

olavloite

If a transaction is aborted before a batchUpdateAsync call, the RPC will return an Aborted status. This status was not translated to a com.google.cloud.spanner.AbortedException, but was instead returned as a com.google.api.gax.rpc.AbortedException, which could cause retry handling to fail.

Fixes GoogleCloudPlatform/java-docs-samples#3634

@google-clagoogle-cla bot added the cla: yesThis human has signed the Contributor License Agreement.label Sep 10, 2020
@codecov

Codecov Report

❗ No coverage uploaded for pull request base (master@45d8419). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #421   +/-   ##
=========================================
  Coverage          ?   82.16%           
  Complexity        ?     2455           
=========================================
  Files             ?      136           
  Lines             ?    13589           
  Branches          ?     1307           
=========================================
  Hits              ?    11166           
  Misses            ?     1895           
  Partials          ?      528           
Impacted FilesCoverage ΔComplexity Δ
...om/google/cloud/spanner/TransactionRunnerImpl.java86.08% <100.00%> (ø)9.00 <0.00> (?)
.../google/cloud/spanner/SpannerExceptionFactory.java71.79% <0.00%> (ø)33.00% <0.00%> (?%)
...n/java/com/google/cloud/spanner/SessionClient.java91.26% <0.00%> (ø)15.00% <0.00%> (?%)
.../com/google/cloud/spanner/v1/stub/SpannerStub.java5.88% <0.00%> (ø)1.00% <0.00%> (?%)
...r/src/main/java/com/google/cloud/spanner/Type.java93.20% <0.00%> (ø)59.00% <0.00%> (?%)
...anner/admin/database/v1/DatabaseAdminSettings.java15.94% <0.00%> (ø)2.00% <0.00%> (?%)
.../main/java/com/google/cloud/spanner/Operation.java73.97% <0.00%> (ø)19.00% <0.00%> (?%)
...panner/connection/AbstractMultiUseTransaction.java93.75% <0.00%> (ø)7.00% <0.00%> (?%)
...nner/admin/database/v1/stub/DatabaseAdminStub.java3.70% <0.00%> (ø)1.00% <0.00%> (?%)
...a/com/google/cloud/spanner/SpannerRetryHelper.java68.18% <0.00%> (ø)3.00% <0.00%> (?%)
... and 127 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45d8419...a506839. Read the comment docs.

@product-auto-labelproduct-auto-label bot added the api: spannerIssues related to the googleapis/java-spanner API.label Sep 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@olavloiteolavloite merged commit 6154008 into master Sep 11, 2020
@olavloiteolavloite deleted the fix-aborted-handling-for-batch-update-async branch September 11, 2020 05:58
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#2667
Sign up for free to join this conversation on . Already have an account? Sign in to comment
Issues related to the googleapis/java-spanner API.cla: yesThis human has signed the Contributor License Agreement.
None yet

Successfully merging this pull request may close these issues.

com.example.spanner.AsyncExamplesIT: asyncTransactionManager_shouldUpdateRows failed