GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: support multiplexed sessions for RO transactions by harshachinta · Pull Request #3141 · googleapis/java-spanner

This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Conversation

@harshachinta

@harshachinta harshachinta commented May 30, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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,

  1. GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS is set to true - Client uses multiplexed sessions.
  2. GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS is set to false - Client uses regular session cached in the session pool for running 1 concurrent transaction per session.
  3. 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@harshachinta
feat(spanner): environment variable to enable multiplexed sessions
b34a742
@harshachinta
harshachinta requested review from a team May 30, 2024 10:31
@generated-files-bot

generated-files-bot Bot commented May 30, 2024

Copy link
Copy Markdown

Warning: This pull request is touching the following templated files:

  • .github/workflows/ci.yaml
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels May 30, 2024
@harshachinta harshachinta added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed api: spanner Issues related to the googleapis/java-spanner API. labels May 30, 2024
@harshachinta
harshachinta requested a review from arpan14 May 30, 2024 10:49
@harshachinta
chore: lint fix
bca5829
@harshachinta
harshachinta requested a review from olavloite May 30, 2024 11:03
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the googleapis/java-spanner API. label May 31, 2024
@harshachinta

harshachinta commented Jun 13, 2024

Copy link
Copy Markdown
Contributor Author

@harshachinta
Check if #3156 is also a blocker for releasing mux.
Reason: https://github.com/googleapis/java-spanner/blob/main/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java#L2971-L2975

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@olavloite

olavloite commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

Check if #3156 is also a blocker for releasing mux.
Reason: https://github.com/googleapis/java-spanner/blob/main/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java#L2971-L2975

@harshachinta No, it's not a blocker. All of it is dead code, due to the static return false in https://github.com/googleapis/java-spanner/blob/main/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java#L2971-L2975

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@harshachinta
feat(spanner): add comment for gRPC-GCP
9704c27
@harshachinta
harshachinta requested review from olavloite and removed request for arpan14 and olavloite June 24, 2024 11:53
@harshachinta harshachinta assigned arpan14 and unassigned arpan14 Jun 24, 2024
@harshachinta
harshachinta requested a review from arpan14 June 24, 2024 11:53
@harshachinta harshachinta changed the title feat(spanner): environment variable to enable multiplexed sessions feat(spanner): support multiplexed sessions for RO transactions Jun 24, 2024
olavloite
olavloite suggested changes Jun 24, 2024
View reviewed changes
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@olavloite olavloite changed the title feat(spanner): support multiplexed sessions for RO transactions feat: support multiplexed sessions for RO transactions Jun 24, 2024
olavloite
olavloite reviewed Jun 24, 2024
View reviewed changes
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

harshachinta added 3 commits June 24, 2024 15:49
@harshachinta
feat(spanner): make strict check in env variable
e647f4f
@harshachinta
feat(spanner): add test
71c0f62
@harshachinta
feat(spanner): add test
ad1ee20
olavloite
olavloite approved these changes Jun 25, 2024
View reviewed changes
@harshachinta
Merge branch 'main' into mux-new-env-var
9347a57
@harshachinta
chore(spanner): lint
1ed9581
@harshachinta harshachinta added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 2, 2024
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 2, 2024
@gcf-owl-bot
🦉 Updates from OwlBot post-processor
8bc75c5
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
@harshachinta harshachinta removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 3, 2024
@harshachinta
harshachinta merged commit 2b8e9ed into googleapis:main Jul 3, 2024
@release-please release-please Bot mentioned this pull request Jul 3, 2024
chore(main): release 6.71.0 #3194
Merged
surbhigarg92 pushed a commit to surbhigarg92/java-spanner that referenced this pull request Jul 3, 2024
@harshachinta @gcf-owl-bot @surbhigarg92
feat: support multiplexed sessions for RO transactions (googleapis#3141)
f69ec88
* 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@arpan14 arpan14 Awaiting requested review from arpan14
1 more reviewer
@olavloite olavloite olavloite approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: spanner Issues related to the googleapis/java-spanner API. size: m Pull request size is medium.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@harshachinta @olavloite @arpan14
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.