This repository was archived by the owner on Apr 7, 2026. It is now read-only.
feat: support multiplexed sessions for RO transactions#3141
Merged
harshachinta merged 9 commits intogoogleapis:mainfrom Jul 3, 2024
Merged
feat: support multiplexed sessions for RO transactions#3141harshachinta merged 9 commits intogoogleapis:mainfrom
harshachinta merged 9 commits intogoogleapis:mainfrom
Conversation
|
Warning: This pull request is touching the following templated files:
|
Contributor
Author
|
@harshachinta |
Collaborator
@harshachinta No, it's not a blocker. All of it is dead code, due to the static |
olavloite
suggested changes
Jun 24, 2024
olavloite
reviewed
Jun 24, 2024
olavloite
approved these changes
Jun 25, 2024
surbhigarg92
pushed a commit
to surbhigarg92/java-spanner
that referenced
this pull request
Jul 3, 2024
* feat(spanner): environment variable to enable multiplexed sessions * chore: lint fix * feat(spanner): add comment for gRPC-GCP * feat(spanner): make strict check in env variable * feat(spanner): add test * feat(spanner): add test * chore(spanner): lint * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With multiplexed sessions, the client optimizes and runs multiple applicable requests concurrently on a single session. A single multiplexed session is sufficient to handle all concurrent read-only traffic. Read/write transactions always use regular sessions.
This can be enabled through an environment variable
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS.Session management behavior in Java client,
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONSis set totrue- Client uses multiplexed sessions.GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONSis set tofalse- Client uses regular session cached in the session pool for running 1 concurrent transaction per session.GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONSis not set - Client uses default session management mechanism which is using regular session cached in the session pool.Note: Multiplexed sessions is unsupported when you use SpannerOption#enableGrpcGcpExtension. Enable multiplexed sessions when gRPC-GCP is unset.