Session pool should not create new sessions when pending < numWaiters #790
Labels
api: spanner
Issues related to the googleapis/nodejs-spanner API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
The session pool should not initiate the creation of new sessions if the current number of sessions being created is greater than current number of waiters for a session when an application requests a session. Instead, the requester should be placed in a waiter queue and wait for one of the pending sessions to become available.
The following example will create a session pool with 101 sessions instead of 100, as there is no session available yet when the query is being executed. Instead of waiting for the session pool initialization to return one of the 100 sessions being created, the query will also initiate the creation of a session.
The text was updated successfully, but these errors were encountered: