Commit ba9711f
fix(spanner): prevent possible panic for Session not found errors (#10386)
The Spanner client library could panic if specifically the following situation would occur: 1. Create a StmtBasedReadWriteTransaction 2. Only execute mutations, so that an explicit BeginTransaction RPC is required. 3. The BeginTransaction RPC returns "Session not found" 4. The client library tries to get a new session from the pool. Step 4 above would panic, because the client library did not set the readOnlyTransaction.sp field for StmtBasedReadWriteTransactions. Fixes #10385 Co-authored-by: rahul2393 <irahul@google.com>1 parent 1e2af81 commit ba9711f
2 files changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3474 | 3474 | | |
3475 | 3475 | | |
3476 | 3476 | | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
3477 | 3492 | | |
3478 | 3493 | | |
3479 | 3494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1756 | 1756 | | |
1757 | 1757 | | |
1758 | 1758 | | |
| 1759 | + | |
1759 | 1760 | | |
1760 | 1761 | | |
1761 | 1762 | | |
| |||
0 commit comments