feat(spanner): add support of multiplexed session support in writeAtleastOnce mutations#10646
feat(spanner): add support of multiplexed session support in writeAtleastOnce mutations#10646
Conversation
| 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.
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.
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())