You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was debugging GoogleCloudPlatform/cloud-spanner-emulator#159 problem and found out that using spanner.Client leaves about 100 sessions open per client. This in test environments can lead to a situation where creating 1000 clients ands up creating 80k sessions. This slows down trivial queries with new clients to 1s+.
It seems that client.Close does not close the batch created sessions.
@egonelbre It was decided before that client libraries won't do the session cleanup or(DeleteSession RPC calls), so if a session is idle for an hour in backend it should be done automatically.
I was debugging GoogleCloudPlatform/cloud-spanner-emulator#159 problem and found out that using
spanner.Client
leaves about 100 sessions open per client. This in test environments can lead to a situation where creating 1000 clients ands up creating 80k sessions. This slows down trivial queries with new clients to 1s+.It seems that
client.Close
does not close the batch created sessions.Code
Reproducer
Expected behavior
After
client.Close
returns, there are no sessions left open. This assumes normal operations, of course.Actual behavior
100 new sessions open after
client.Close()
.Screenshots
Plot of time taken for
SELECT 1
over time, where each query creates a new client.The text was updated successfully, but these errors were encountered: