zncleon opened a new issue, #15759:
URL: https://github.com/apache/iceberg/issues/15759

   ### Apache Iceberg version
   
   main (development)
   
   ### Query engine
   
   Flink
   
   ### Please describe the bug 🐞
   
   In JdbcLockFactory.JdbcLock, the instanceId() and unlock() methods catch 
SQLException inside the lambda passed to ClientPoolImpl.run() and wrap it as 
UncheckedSQLException (a RuntimeException). This prevents ClientPoolImpl's 
built-in connection retry mechanism from ever triggering on connection 
failures, causing the Flink LockRemover operator to fail with no recovery.
   
https://github.com/apache/iceberg/blob/5dff6f6d778f1a944d87ac5029e56b953d24c3c5/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/maintenance/api/JdbcLockFactory.java#L263-L267
   
   When ClientPoolImpl.run() catches this UncheckedSQLException:
   ```
   reconnectExc.isInstance(exc) → 
   SQLTransientException.isInstance(UncheckedSQLException) → false
   exc instanceof SQLException → false (it's a RuntimeException)
   
   Result: isConnectionException() returns false, retry is skipped, exception 
propagates directly
   ```
   
   Is this a design or a bug?
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [x] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


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