Anurag-S1ngh opened a new pull request, #19247:
URL: https://github.com/apache/iceberg/pull/19247

   ## Summary
   
   - `JdbcClientPool` only retried `SQLTransientException` or SQLSTATEs from 
the configured retryable set. MySQL reports a dropped connection as 
`CommunicationsException`, which extends `SQLRecoverableException`, so no 
reconnect happened. The dead connection went back to the head of the pool and 
the next call failed the same way.
   - Treat `SQLRecoverableException` as a connection failure. The JDBC contract 
for that type is that recovery requires closing the connection and opening a 
new one, which is what the pool already does.
   
   ## Changes
   
   - `JdbcClientPool.isConnectionException`: also match 
`SQLRecoverableException`.
   - Add `TestJdbcClientPool`, covering retry after a recoverable failure, 
classification of a recoverable exception as retryable, and a non-transient 
exception as not retryable.
   
   ## Testing
   
   - `./gradlew :iceberg-core:test --tests 
"org.apache.iceberg.jdbc.TestJdbcCatalog" --tests 
"org.apache.iceberg.jdbc.TestJdbcClientPool"` passes.
   - The retry tests fail without the change.
   - `spotlessApply` run for the module.
   
   Closes #17829
   


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