- Notifications
You must be signed in to change notification settings - Fork 135
feat: Use multiplex sessions for RW and Partition Ops #3996
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
Merged
sakthivelmanii merged 2 commits into main from enable_multiplex_session_for_rw_partition_ops Jul 31, 2025
Merged
feat: Use multiplex sessions for RW and Partition Ops #3996
sakthivelmanii merged 2 commits into main from enable_multiplex_session_for_rw_partition_ops Jul 31, 2025
Conversation
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
e0b9f2f
to 7bd0ac0
Compare 544a358
to 682a3ab
Compare rahul2393 previously approved these changes Jul 30, 2025
d5b2e8f
to 055ab59
Compare bb4c7f0
to 6e648f9
Compare olavloite approved these changes Jul 31, 2025
rahul2393 approved these changes Jul 31, 2025
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Jul 31, 2025
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-spanner](https://github.com/googleapis/java-spanner) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `6.97.1` -> `6.98.0` | --- ### Release Notes <details> <summary>googleapis/java-spanner (com.google.cloud:google-cloud-spanner)</summary> ### [`v6.98.0`](https://github.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6980-2025-07-31) ##### Features - Proto changes for an internal api ([675e90b](googleapis/java-spanner@675e90b)) - **spanner:** A new field `snapshot_timestamp` is added to message `.google.spanner.v1.CommitResponse` ([675e90b](googleapis/java-spanner@675e90b)) - Support Exemplar ([#​3997](googleapis/java-spanner#3997)) ([fcf0a01](googleapis/java-spanner@fcf0a01)) - Use multiplex sessions for RW and Partition Ops ([#​3996](googleapis/java-spanner#3996)) ([a882204](googleapis/java-spanner@a882204)) ##### Bug Fixes - **deps:** Update the Java code generator (gapic-generator-java) to 2.60.2 ([675e90b](googleapis/java-spanner@675e90b)) ##### Dependencies - Update dependency com.google.cloud:sdk-platform-java-config to v3.50.2 ([#​4004](googleapis/java-spanner#4004)) ([986c0e0](googleapis/java-spanner@986c0e0)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: e7253efcfa4f9166c7524a0c1ef8947662193d8d
zhumin8 added a commit to GoogleCloudPlatform/spring-cloud-gcp that referenced this pull request Aug 19, 2025
spanner IT fails for `deleteAllById_doesNothingOnEmptyIds` test with error from Spanner: `INVALID_ARGUMENT: Failed to initialize transaction due to invalid mutation key.` **Trigger of this behavior change:** spanner activated multiplexed sessions by default in [googleapis/java-spanner#3996](googleapis/java-spanner#3996), which triggers this error. When issuing a write() with a Mutation that has an empty KeySet produces an exception in Multiplexed clients (see [pr](googleapis/java-spanner#4023)), but does a no-op in non-multiplexed ones. Unlike Regular session, multiplex session needs a valid mutation to generate a precommit token. Fixes #4046
zhumin8 added a commit to GoogleCloudPlatform/spring-cloud-gcp that referenced this pull request Aug 19, 2025
spanner IT fails for `deleteAllById_doesNothingOnEmptyIds` test with error from Spanner: `INVALID_ARGUMENT: Failed to initialize transaction due to invalid mutation key.` **Trigger of this behavior change:** spanner activated multiplexed sessions by default in [googleapis/java-spanner#3996](googleapis/java-spanner#3996), which triggers this error. When issuing a write() with a Mutation that has an empty KeySet produces an exception in Multiplexed clients (see [pr](googleapis/java-spanner#4023)), but does a no-op in non-multiplexed ones. Unlike Regular session, multiplex session needs a valid mutation to generate a precommit token. Fixes #4046
zhumin8 added a commit to GoogleCloudPlatform/spring-cloud-gcp that referenced this pull request Aug 19, 2025
spanner IT fails for `deleteAllById_doesNothingOnEmptyIds` test with error from Spanner: `INVALID_ARGUMENT: Failed to initialize transaction due to invalid mutation key.` **Trigger of this behavior change:** spanner activated multiplexed sessions by default in [googleapis/java-spanner#3996](googleapis/java-spanner#3996), which triggers this error. When issuing a write() with a Mutation that has an empty KeySet produces an exception in Multiplexed clients (see [pr](googleapis/java-spanner#4023)), but does a no-op in non-multiplexed ones. Unlike Regular session, multiplex session needs a valid mutation to generate a precommit token. Fixes #4046
zhumin8 added a commit to GoogleCloudPlatform/spring-cloud-gcp that referenced this pull request Aug 19, 2025
spanner IT fails for `deleteAllById_doesNothingOnEmptyIds` test with error from Spanner: `INVALID_ARGUMENT: Failed to initialize transaction due to invalid mutation key.` **Trigger of this behavior change:** spanner activated multiplexed sessions by default in [googleapis/java-spanner#3996](googleapis/java-spanner#3996), which triggers this error. When issuing a write() with a Mutation that has an empty KeySet produces an exception in Multiplexed clients (see [pr](googleapis/java-spanner#4023)), but does a no-op in non-multiplexed ones. Unlike Regular session, multiplex session needs a valid mutation to generate a precommit token. Fixes #4046
zhumin8 added a commit to GoogleCloudPlatform/spring-cloud-gcp that referenced this pull request Aug 19, 2025
backport fix from #4047 spanner IT fails for `deleteAllById_doesNothingOnEmptyIds` test with error from Spanner: `INVALID_ARGUMENT: Failed to initialize transaction due to invalid mutation key.` **Trigger of this behavior change:** spanner activated multiplexed sessions by default in [googleapis/java-spanner#3996](googleapis/java-spanner#3996), which triggers this error. When issuing a write() with a Mutation that has an empty KeySet produces an exception in Multiplexed clients (see [pr](googleapis/java-spanner#4023)), but does a no-op in non-multiplexed ones. Unlike Regular session, multiplex session needs a valid mutation to generate a precommit token. Fixes #4046
zhumin8 added a commit to GoogleCloudPlatform/spring-cloud-gcp that referenced this pull request Aug 19, 2025
Backport fix. spanner IT fails for `deleteAllById_doesNothingOnEmptyIds` test with error from Spanner: `INVALID_ARGUMENT: Failed to initialize transaction due to invalid mutation key.` **Trigger of this behavior change:** spanner activated multiplexed sessions by default in [googleapis/java-spanner#3996](googleapis/java-spanner#3996), which triggers this error. When issuing a write() with a Mutation that has an empty KeySet produces an exception in Multiplexed clients (see [pr](googleapis/java-spanner#4023)), but does a no-op in non-multiplexed ones. Unlike Regular session, multiplex session needs a valid mutation to generate a precommit token.
zhumin8 added a commit to GoogleCloudPlatform/spring-cloud-gcp that referenced this pull request Aug 19, 2025
Backport fix. spanner IT fails for `deleteAllById_doesNothingOnEmptyIds` test with error from Spanner: `INVALID_ARGUMENT: Failed to initialize transaction due to invalid mutation key.` **Trigger of this behavior change:** spanner activated multiplexed sessions by default in [googleapis/java-spanner#3996](googleapis/java-spanner#3996), which triggers this error. When issuing a write() with a Mutation that has an empty KeySet produces an exception in Multiplexed clients (see [pr](googleapis/java-spanner#4023)), but does a no-op in non-multiplexed ones. Unlike Regular session, multiplex session needs a valid mutation to generate a precommit token. Fixes #4046
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Description:
Read-Write and Partition Ops transactions now use a single multiplexed session, instead of a session from the session pool. Multiplexed sessions can handle any number of queries and read-only, read-write and partition ops transactions transactions at the same time.
The use of multiplexed sessions can be disabled for read-write and partition-ops transactions by setting the environment variables.
See https://cloud.google.com/spanner/docs/sessions#multiplexed_sessions for more background information about multiplexed sessions.