This repository was archived by the owner on Oct 20, 2026. It is now read-only.
Repository navigation
feat(spanner): add support for Multiplexed Session for Read Only Tran… - #2214
Merged
Merged
Conversation
* chore(main): release 7.17.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: surbhigarg92 <surbhigarg.92@gmail.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [7.17.1](https://togithub.com/googleapis/nodejs-spanner/compare/v7.17.0...v7.17.1) (2025-01-03) ### Bug Fixes * Remove default global trace context propagator ([#2209](https://togithub.com/googleapis/nodejs-spanner/issues/2209)) ([7898e0c](https://togithub.com/googleapis/nodejs-spanner/commit/7898e0ce0477e2d4327822ac26a2674203b47a64)), closes [#2208](https://togithub.com/googleapis/nodejs-spanner/issues/2208) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
alkatrivedi
force-pushed
the
multiplexed-session-support-read-only
branch
2 times, most recently
from
January 9, 2025 05:26
8a256e0 to
7cf1d60
Compare
alkatrivedi
force-pushed
the
multiplexed-session-support-read-only
branch
from
January 9, 2025 05:29
7cf1d60 to
9a85b93
Compare
alkatrivedi
force-pushed
the
multiplexed-session-support-read-only
branch
from
January 9, 2025 06:14
860bf28 to
47a9219
Compare
alkatrivedi
force-pushed
the
multiplexed-session-support-read-only
branch
from
January 9, 2025 06:41
47a9219 to
3a3d8c7
Compare
alkatrivedi
force-pushed
the
multiplexed-session-support-read-only
branch
from
January 9, 2025 06:42
3a3d8c7 to
bc56399
Compare
alkatrivedi
force-pushed
the
multiplexed-session-support-read-only
branch
from
January 9, 2025 06:43
bc56399 to
f477940
Compare
…b.com/googleapis/nodejs-spanner into multiplexed-session-support-read-only
…b.com/googleapis/nodejs-spanner into multiplexed-session-support-read-only
alkatrivedi
force-pushed
the
multiplexed-session-support-read-only
branch
6 times, most recently
from
January 23, 2025 06:12
1e73e06 to
9b092ef
Compare
surbhigarg92
approved these changes
Jan 23, 2025
surbhigarg92
left a comment
Contributor
There was a problem hiding this comment.
Please share benchmarking results before merging
|
|
||
| 'use strict'; | ||
|
|
||
| const muxEnabledTrue = []; |
Contributor
There was a problem hiding this comment.
nit: I don't think you need to maintain two arrays here. You will either call this script with multiplexedEnabled as true or false. So only one will be used.
| } | ||
|
|
||
| async function runQueries() { | ||
| multiplexedEnabled === 'true' |
Contributor
There was a problem hiding this comment.
Every thread is creating new Spanner instance, that would mean it will create a new mux session. So eventually we are running only one query at a time for one spanner client.
Contributor
Author
There was a problem hiding this comment.
thanks for pointing this out, updated the client creation
This was referenced Feb 24, 2025
7 tasks done
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.
This PR contains support for Multiplexed Session in all the RO methods, along with their tests.
The methods includes are:
getSnapshotrunStreamwriteAtLeastOnceTo enable multiplexed session set the environment variable GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS to true
Note: if multiplexed session is enabled, database should exists before getting a reference to cloud spanner database
const database = instance.database(databaseId);