Skip to content

[Spanner] Re-create sessions that have been invalidated by the server #6284

@taka-oyama

Description

@taka-oyama

I was reading through the documentation on Sessions and noticed the following line.

Attempts to use a deleted session result in NOT_FOUND. If you encounter this error, create and use a new session, add the new session to the pool, and remove the deleted session from the pool.

Currently, this is not possible from userland because there is no public method available to delete the current session.

Would it be possible to handle this on the library side?

I found that this is handled by the library in google-cloud-java googleapis/google-cloud-java#4734.
Here is another example from google-cloud-go googleapis/google-cloud-go#1527.

Creating a case where the server throws a "NOT FOUND" exception can be reproduced by following the steps on #5827.

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions