yadavay-amzn opened a new pull request, #16049:
URL: https://github.com/apache/iceberg/pull/16049

   ## Summary
   
   In `JdbcLockFactory.JdbcLock`, the `instanceId()` and `unlock()` methods 
caught `SQLException` inside the lambda passed to `ClientPoolImpl.run()` and 
wrapped it as `UncheckedSQLException` (a `RuntimeException`). This prevented 
`ClientPoolImpl`'s retry mechanism from triggering because 
`isConnectionException()` checks for `SQLException`, not 
`UncheckedSQLException`.
   
   ## Fix
   
   Removed the inner `try-catch` blocks that wrapped `SQLException` as 
`UncheckedSQLException` inside the lambdas. The lambda signature for 
`ClientPoolImpl.run()` already declares `throws Exception`, so `SQLException` 
propagates naturally to `ClientPoolImpl` where the retry logic can detect 
connection exceptions and retry appropriately.
   
   The outer `catch (SQLException e)` blocks remain to convert to 
`UncheckedSQLException` after `ClientPoolImpl` has exhausted its retry attempts.
   
   Closes #15759


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