Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

chore: add flag to force-disable multiplexed sessions#3083

Merged
rahul2393 merged 1 commit intomainfrom
force-disable-mux
May 3, 2024
Merged

chore: add flag to force-disable multiplexed sessions#3083
rahul2393 merged 1 commit intomainfrom
force-disable-mux

Conversation

@olavloite
Copy link
Copy Markdown
Collaborator

Adds an environment variable that can be used to force-disable the use of multiplexed sessions.

Adds an environment variable that can be used to force-disable the
use of multiplexed sessions.
@olavloite olavloite requested a review from a team May 3, 2024 05:26
@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 3, 2024
@olavloite olavloite requested a review from arpan14 May 3, 2024 05:27
this.useMultiplexedSession =
builder.useMultiplexedSession
&& !Boolean.parseBoolean(
System.getenv("GOOGLE_CLOUD_SPANNER_FORCE_DISABLE_MULTIPLEXED_SESSIONS"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case are we expecting customers to set this env to disable multiplexed sessions, if yes then why not customers just set useMultiplexedSession=false in Spanner.Options?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want an escape that they can very quickly set with zero code changes in case of calamities.

Copy link
Copy Markdown
Contributor

@rahul2393 rahul2393 May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok so bare minimum one need to restart the application after the env changes to disable multiplexed session.

Thanks for clarification. we need to make sure the same env is used in other languages as fail safe.

@olavloite olavloite added kokoro:force-run Add this label to force Kokoro to re-run the tests. automerge Merge the pull request once unit tests and other checks pass. labels May 3, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 3, 2024
@rahul2393 rahul2393 merged commit e595157 into main May 3, 2024
@rahul2393 rahul2393 deleted the force-disable-mux branch May 3, 2024 07:39
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label May 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants