This repository has been archived by the owner on Dec 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
maintain desired SessionPool size #1172
Labels
api: spanner
Issues related to the googleapis/google-cloud-cpp-spanner API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Milestone
Comments
mr-salty
added a commit
that referenced
this issue
Mar 10, 2020
* feat: refactor and enhance session creation logic Centralize all Session creation in the `Grow()` method, which computes the number of Sessions to create on each channel to balance the load across channels. Also introduces an async mode (not implemented here) which will eventually become the only mode. Also fixes a bug where the per-channel session counts were not being updated properly when `Sessions` were marked bad or disassociated. Maybe this part should be its own PR, and I don't really like how it obfuscates the locking requirements so I'm open to suggestions on how to do this in a cleaner way. Part of #1172 * address review comments * address review comments
Still TODO here:
|
@mr-salty I think we should close this now? |
I still have the "clean up old sessions" PR pending, I think it's done but I really need to do the fake clock before I can write tests for it. I can file another issue for the "delete" part though. |
That sounds like the way to go. |
done (#1435) |
devjgm
pushed a commit
to devjgm/google-cloud-cpp
that referenced
this issue
May 7, 2020
…ud-cpp-spanner#1270) * chore: add some async methods to SpannerStub These are only for use by `SessionPool`; we are not exposing any async APIs to users at this time. Part of googleapis/google-cloud-cpp-spanner#1171 and googleapis/google-cloud-cpp-spanner#1172 * ABI/API update the "break" is adding pure virtual methods to an internal object (`SpannerStub`), so it's not actually a break.
devjgm
pushed a commit
to devjgm/google-cloud-cpp
that referenced
this issue
May 7, 2020
…cloud-cpp-spanner#1343) * feat: refactor and enhance session creation logic Centralize all Session creation in the `Grow()` method, which computes the number of Sessions to create on each channel to balance the load across channels. Also introduces an async mode (not implemented here) which will eventually become the only mode. Also fixes a bug where the per-channel session counts were not being updated properly when `Sessions` were marked bad or disassociated. Maybe this part should be its own PR, and I don't really like how it obfuscates the locking requirements so I'm open to suggestions on how to do this in a cleaner way. Part of googleapis/google-cloud-cpp-spanner#1172 * address review comments * address review comments
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/google-cloud-cpp-spanner API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
There are 2 parameters that specify the desired
SessionPool
size (plusmax_sessions_per_channel
which establishes an upper bound). TheSessionPool
should create or deleteSessions
in the background to maintain the desired size.min_sessions
specifies the minimum number ofSessions
associated with the pool, whether idle or in-use. Currently we createmin_sessions
Sessions
at pool creation time but do not replenishSessions
if the number drops below thatmax_idle_sessions
specified the maximum number of idleSessions
to keep in the pool; anySessions
in excess of this number should be periodically deleted.The text was updated successfully, but these errors were encountered: