Unhandled exception when running parallel queries with first query as "invalid" in a transaction. #2092
Labels
api: spanner
Issues related to the googleapis/nodejs-spanner API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
The Nodejs library does not handle below scenario, where the first query throws an error while trying to execute parallel queries in a transaction .
Expected: The initial call to ExecuteStreamingSql should fail, which also means that there is no transaction ID that is returned. The transaction is retried with an explicit BeginTransaction and then the invalid SQL + working SQL statement are executed again. Error will be thrown from the invalid SQL statement.
Actual: The initial call to ExecuteStreamingSql fails which initiates a explicit BeginTransaction as per this code . But since this request is not awaited, error is thrown to the catch block and begin transaction continues in parallel , ultimately throwing unhandled exception.
The text was updated successfully, but these errors were encountered: