Skip to content
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

start using SessionPool::Multiplexed() #14224

Open
devbww opened this issue May 10, 2024 · 0 comments
Open

start using SessionPool::Multiplexed() #14224

devbww opened this issue May 10, 2024 · 0 comments
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@devbww
Copy link
Contributor

devbww commented May 10, 2024

What component of google-cloud-cpp is this feature request for?
Spanner

Is your feature request related to a problem? Please describe.
From the internal doc: "Multiplexed sessions are a new session management model that aims to be simpler to use, more efficient, and less error-prone. A multiplexed session explicitly allows an unbounded number of concurrent operations on a single session resource. This work is intended to simplify Cloud Spanner’s client libraries by removing the need to pool sessions and simplify the client configuration by removing the need for users to configure an appropriate number of sessions, while also eliminating the possibility of session leaks. As an additional benefit, multiplexed sessions can improve Cloud Spanner’s efficiency in both SpanFEs and span servers by avoiding the creation and maintenance of session metadata."

Describe the solution you'd like
spanner::SessionPool now (#14216) supports allocating a multiplexed session via its Multiplexed() function. At some point we want spanner_internal::ConnectionImpl::PrepareSession() to start using the multiplexed session.

The multiplexed sessions work is meant to rollout in three phases, read-only, partitioned operations, and read-write. In each phase, the client may continue to use regular sessions for operations not supported by multiplexed sessions.

PrepareSession() and it callers probably don't have enough information to distinguish those three cases at the moment, so some plumbing would need to be done. Or, we could wait until phase 3 when using the multiplexed session becomes unconditional (and when all the BatchCreateSessions() and SessionPool::sessions_ and related configuration stuff could be removed).

Internal developers may be able to see http://docs/document/d/1CwooIJHh4y6GJbQ0ts8ZIeLLZTJdbSHdbWNQUFTLL88

@devbww devbww added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant