-
Notifications
You must be signed in to change notification settings - Fork 131
feat: support multiplexed sessions for RO transactions #3141
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
Conversation
Warning: This pull request is touching the following templated files:
|
@harshachinta |
@harshachinta No, it's not a blocker. All of it is dead code, due to the static |
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java
Outdated
Show resolved
Hide resolved
* 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>
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_SESSIONS
is set totrue
- Client uses multiplexed sessions.GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS
is set tofalse
- Client uses regular session cached in the session pool for running 1 concurrent transaction per session.GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS
is 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.