-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(spanner): add support of multiplexed session support in writeAtleastOnce mutations #10646
Conversation
@@ -1890,7 +1890,7 @@ func (t *writeOnlyTransaction) applyAtLeastOnce(ctx context.Context, ms ...*Muta | |||
for { | |||
if sh == nil || sh.getID() == "" || sh.getClient() == nil { | |||
// No usable session for doing the commit, take one from pool. | |||
sh, err = t.sp.take(ctx) | |||
sh, err = t.sp.takeMultiplexed(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that it falls back to regular sessions in case there is an issue with multiplexed sessions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it will fallback to regular session, that logic is handled in takeMultiplexed
because that behaviour is common
LGTM. |
We are not using different env var |
🤖 I have created a release *beep* *boop* --- ## [1.66.0](https://togithub.com/googleapis/google-cloud-go/compare/spanner/v1.65.0...spanner/v1.66.0) (2024-08-07) ### Features * **spanner/admin/database:** Add support for Cloud Spanner Incremental Backups ([d949cc0](https://togithub.com/googleapis/google-cloud-go/commit/d949cc0e5d44af62154d9d5fd393f25a852f93ed)) * **spanner:** Add support of multiplexed session support in writeAtleastOnce mutations ([#10646](https://togithub.com/googleapis/google-cloud-go/issues/10646)) ([54009ea](https://togithub.com/googleapis/google-cloud-go/commit/54009eab1c3b11a28531ad9e621917d01c9e5339)) * **spanner:** Add support of using multiplexed session with ReadOnlyTransactions ([#10269](https://togithub.com/googleapis/google-cloud-go/issues/10269)) ([7797022](https://togithub.com/googleapis/google-cloud-go/commit/7797022e51d1ac07b8d919c421a8bfdf34a1d53c)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
client.Apply(context.Background(), {mutations}, spanner.ApplyAtLeastOnce())