-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add SessionPoolOptions.setFailIfPoolExhausted in SpannerAccessor #31663
Conversation
Assigning reviewers. If you would like to opt out of this review, comment R: @robertwb for label java. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Can you explain why you believe this is necessary to add? The default session pool options in Java are:
These will apply to each worker indivudually. @olavloite for comment. |
This is my primary motivation - Currently, there is no way to set |
In theory there should never be an inactive transaction left open by SpannerIO. Writes use blind writes by calling DatabaseClient.writeAtLeastOnce, which internally uses the single_use_transaction feature of the Commit API so that a transaction is automatically started and closed by the Spanner server. Reads use a single read transaction, which is shared across all workers. By their nature these are long-running transactions. SpannerIO is intended to isolate users from needing to worry about transactions, and to just pass their data in and let the connecter deal with it. If you are experiencing issues with session pool exhaustion, and believe that there may be a bug, then please raise an issue. |
|
Reminder, please take a look at this pr: @robertwb @damondouglas @nielm |
Bump! @nielm @olavloite |
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @kennknowles for label java. Available commands:
|
dc74994
to
efee92b
Compare
Result of out-of-band discussion between @manitgupta and @olavloite - Change the PR such that SpannerAccessor always sets
to avoid expanding the SpannerIO public API surface while also catching potential session leak bugs. |
LGTM Precommit fails for unrelated reason in |
Reminder, please take a look at this pr: @kennknowles @ahmedabu98 @nielm |
reverted in #32694 |
Configures SpannerAccessor to set the
setFailIfPoolExhausted
SessionPoolOption
which ensures that the Spanner client throws an error if the session pool is exhausted.Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.