database.read and database.execute_sql should not return the session to the pool till the stream is closed #3768
Labels
api: spanner
Issues related to the Spanner API.
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
release blocking
Required feature/issue must be fixed prior to next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Cloud Spanner API says that at any point in time there can be at most one active transaction. But the way
database.read
anddatabase.execute_query
have been implemented, they return the session to the pool immediately. Now that session can be reused for doing something else even before the stream returned by previousdatabase.read
has completed. This needs to be fixed so that the sessions is returned to the pool only after the iterator has been completely consumed or closed.This needs to be done before Beta.
The text was updated successfully, but these errors were encountered: