Cloud Spanner API says that at any point in time there can be at most one active transaction. But the way database.read and database.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 previous database.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.
Cloud Spanner API says that at any point in time there can be at most one active transaction. But the way
database.readanddatabase.execute_queryhave 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.readhas 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.