-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Spanner: Session pool should not retry BeginTransaction if database has been deleted #6789
Spanner: Session pool should not retry BeginTransaction if database has been deleted #6789
Conversation
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 fixing this issue so quickly.
...e-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #6789 +/- ##
============================================
- Coverage 46.37% 46.37% -0.01%
- Complexity 28026 28028 +2
============================================
Files 2614 2615 +1
Lines 288327 288309 -18
Branches 33810 33809 -1
============================================
- Hits 133723 133709 -14
+ Misses 144339 144334 -5
- Partials 10265 10266 +1
Continue to review full report at Codecov.
|
@skuruppu I also added a check for PermissionDenied to the session pool, as that error would cause the exact same problem as NotFound (and the same as in the Go client). |
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 the quick fix.
The session pool could start an infinite loop of prepare session calls (BeginTransaction) if the underlying database has been deleted. Instead, the session pool should detect this situation and not retry the call.
Fixes #6779