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

fix: fix aborted handling of batchUpdateAsync #421

Merged
merged 1 commit into from Sep 11, 2020

Conversation

olavloite
Copy link
Contributor

@olavloite olavloite commented Sep 10, 2020

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-cla google-cla bot added the cla: yes label Sep 10, 2020
@olavloite olavloite requested review from skuruppu and thiagotnunes Sep 10, 2020
@codecov
Copy link

@codecov codecov bot commented Sep 10, 2020

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 Files Coverage Δ Complexity Δ
...om/google/cloud/spanner/TransactionRunnerImpl.java 86.08% <100.00%> (ø) 9.00 <0.00> (?)
.../google/cloud/spanner/SpannerExceptionFactory.java 71.79% <0.00%> (ø) 33.00% <0.00%> (?%)
...n/java/com/google/cloud/spanner/SessionClient.java 91.26% <0.00%> (ø) 15.00% <0.00%> (?%)
.../com/google/cloud/spanner/v1/stub/SpannerStub.java 5.88% <0.00%> (ø) 1.00% <0.00%> (?%)
...r/src/main/java/com/google/cloud/spanner/Type.java 93.20% <0.00%> (ø) 59.00% <0.00%> (?%)
...anner/admin/database/v1/DatabaseAdminSettings.java 15.94% <0.00%> (ø) 2.00% <0.00%> (?%)
.../main/java/com/google/cloud/spanner/Operation.java 73.97% <0.00%> (ø) 19.00% <0.00%> (?%)
...panner/connection/AbstractMultiUseTransaction.java 93.75% <0.00%> (ø) 7.00% <0.00%> (?%)
...nner/admin/database/v1/stub/DatabaseAdminStub.java 3.70% <0.00%> (ø) 1.00% <0.00%> (?%)
...a/com/google/cloud/spanner/SpannerRetryHelper.java 68.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-label product-auto-label bot added the api: spanner label Sep 10, 2020
Copy link
Contributor

@thiagotnunes thiagotnunes left a comment

LGTM

@olavloite olavloite merged commit 6154008 into master Sep 11, 2020
18 checks passed
@olavloite olavloite deleted the fix-aborted-handling-for-batch-update-async branch Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants