Repository navigation
Commit 151cf1d
committed
fix(bigquery-jdbc): add connection state reset hook and async abort support
- Add package-private BigQueryConnection.resetForReuse() to close open statements, reset autoCommit to true, roll back active transactions without starting a follow-up transaction, abort driver-created sessions even when the calling thread is interrupted, preserve un-aborted session/transaction state on interrupted RPCs for physical teardown, clear clientInfo and SQLWarnings, and restore holdability.
- Pass startNextTransaction=false from closeImpl() so physical close does not start a new transaction on caller-managed sessions, and register MDC in close().
- Execute physical teardown asynchronously via Executor in BigQueryConnection.abort(Executor) after marking isClosed synchronously, and honor configured Timeout on transaction commit/rollback job waits.
- Track optional pooled logical Connection owner on BigQueryStatement so ResultSet.getStatement().getConnection() returns the logical handle.1 parent 44dbda5 commit 151cf1d
4 files changed
Lines changed: 610 additions & 58 deletions
File tree
- java-bigquery-jdbc/src
- main/java/com/google/cloud/bigquery/jdbc
- test/java/com/google/cloud/bigquery/jdbc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
| |||
0 commit comments