Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@olavloite
Copy link
Collaborator

SessionNotFoundException was not retried if these happened when using AsyncTransactionManager. These exceptions are now handled explicitly in the following way:

  1. The underlying session that is used for the transaction is replaced with a new session from the pool.
  2. The SessionNotFoundException is translated to an AbortedException, which again will be retried, assuming that the client application has implemented a normal retry loop, as is required when using an AsyncTransactionManager.

@olavloite olavloite requested a review from a team as a code owner October 26, 2020 15:02
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 26, 2020
Copy link
Contributor

@thiagotnunes thiagotnunes left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Oct 27, 2020

Codecov Report

Merging #552 into master will increase coverage by 0.13%.
The diff coverage is 89.10%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #552      +/-   ##
============================================
+ Coverage     83.93%   84.06%   +0.13%     
- Complexity     2501     2504       +3     
============================================
  Files           141      141              
  Lines         13766    13806      +40     
  Branches       1315     1317       +2     
============================================
+ Hits          11554    11606      +52     
+ Misses         1667     1654      -13     
- Partials        545      546       +1     
Impacted Files Coverage Δ Complexity Δ
...gle/cloud/spanner/AsyncTransactionManagerImpl.java 70.42% <33.33%> (-1.01%) 12.00 <1.00> (ø)
...ain/java/com/google/cloud/spanner/SessionPool.java 88.33% <88.46%> (+1.43%) 71.00 <0.00> (ø)
...ud/spanner/SessionPoolAsyncTransactionManager.java 86.55% <100.00%> (+1.64%) 11.00 <1.00> (+2.00)
.../google/cloud/spanner/SpannerExceptionFactory.java 82.92% <0.00%> (+2.43%) 40.00% <0.00%> (+1.00%)

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 d92b7c2...f0eb6d0. Read the comment docs.

@thiagotnunes thiagotnunes merged commit 5969f83 into master Oct 27, 2020
@thiagotnunes thiagotnunes deleted the async-tx-manager-session-retry branch October 27, 2020 04:58
rajatbhatta pushed a commit to rajatbhatta/java-spanner that referenced this pull request Nov 17, 2022
🤖 I have created a release \*beep\* \*boop\*
---
### Updating meta-information for bleeding-edge SNAPSHOT release.
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants