bharos opened a new pull request, #17828:
URL: https://github.com/apache/iceberg/pull/17828

   `JdbcClientPool` recovers from connection failures by reconnecting, but only 
for
   `SQLTransientException` and the SQLSTATEs in 
`COMMON_RETRYABLE_CONNECTION_SQL_STATES`.
   Drivers that report a dropped connection as `SQLRecoverableException` match 
neither, so
   the operation fails and `ClientPoolImpl.release` returns the dead connection 
to the head
   of the pool for the next caller.
   
   MySQL is one such driver: `CommunicationsException` extends 
`SQLRecoverableException` and
   carries SQLSTATE `08S01`, which is not in the default set.
   
   This treats `SQLRecoverableException` as retryable. The JDBC contract for 
that type is that
   recovery requires closing the connection and getting a new one, which is 
what `reconnect`
   does. `maxRetries` is unchanged, so a non-recoverable case costs one 
reconnect attempt
   before the original exception propagates.
   
   ---
   **AI Disclosure**
   - Model: Claude Opus 4.6
   - Platform/Tool: GitHub Copilot
   - Human Oversight: partially reviewed
   - Prompt Summary: Diagnose why a MySQL-backed JDBC catalog never recovers 
from a dropped connection, and implement the fix with a test.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to