Ap-95671 opened a new pull request, #1507:
URL: https://github.com/apache/arrow-java/pull/1507

   ## What's Changed
   
   Honor the timeout configured through `DriverManager.setLoginTimeout` during 
Flight SQL JDBC connection establishment. The timeout covers the authentication 
handshake and initial session setup. Zero keeps the synchronous connection path 
without a login deadline.
   
   When the deadline expires, return `SQLTimeoutException` and cancel pending 
login RPCs. Release partially constructed clients, channels, and allocators on 
failure, and close a connection if it finishes after the caller has timed out.
   
   The JDBC login deadline and the Netty `connectTimeoutMs` socket setting are 
independent. DataSource login-timeout support is tracked separately in #1267.
   
   ## Testing
   
   - Reproduced the stalled authentication on upstream. The driver's two-second 
login timeout did not fire, and the regression test reached its 15-second guard.
   - Covered stalled authentication and session setup, cancellation and 
transport closure, successful connections with zero and positive timeouts, and 
cleanup after the deadline. The driver and client-handler test classes passed 
all 32 cases.
   - Maven verification passed on JDK 21 with 4,607 passing test executions and 
73 skips across 14 modules. Checkstyle, Spotless, dependency analysis, and the 
shaded JAR build passed.
   - A standalone `DriverManager.getConnection` smoke test using the shaded JAR 
raised `SQLTimeoutException` in 1,022 ms with a one-second timeout.
   
   ## AI disclosure
   
   Codex assisted with diagnosis, implementation, tests, validation, and 
drafting this description.
   
   Closes #1268.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [PR] GH-1268: [JDBC] Honor Dri... Ap-95671 (via GitHub) via github

Reply via email to