-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- Programming language: Go
- OS: macOS, Linux
- Language runtime version: 1.23.2
- Package version: 1.7.2
Steps to reproduce
- Use the Cloud Spanner emulator as the backend (it will abort queries more readily than the real Spanner).
- Start a transaction tx1.
- Execute a query (like
SELECT 1) in tx1 that will cause a session to be opened. Leave that session open. - Outside of any transaction context, execute another single-statement query, i.e. (
SELECT 2). - The
SELECT 2query will be aborted (because the emulator only supports one transaction at a time) and will go into an infinite retry loop using(*readWriteTransaction).retry()waiting for tx1 to close. - Close tx1 (rollback or commit).
- If the
SELECT 2query has been retrying for long enough, it will have exhausted the limit on session handles and will block forever waiting for more.SELECT 2will never complete. Also, no more sessions can be opened at this point.
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.