amogh-jahagirdar commented on issue #7173: URL: https://github.com/apache/iceberg/issues/7173#issuecomment-1481884000
I think it should be feasible, I took a look at the code to see how the `JdbcCatalog` works. By default we retry `SQLNonTransientException` https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/jdbc/JdbcClientPool.java#L46 and the exception that gets thrown in your case is ` org.postgresql.util.PSQLException` so we don't retry it. Few things: 1.) SQLNonTransientConnectionException seems to be the wrong thing to even retry. The docs say the following (and it makes sense, it's non-transient, we should only retry transient failures) ``` /** * The subclass of {@link SQLException} thrown for the SQLState * class value '<i>08</i>', or under vendor-specified conditions. This * indicates that the connection operation that failed will not succeed if * the operation is retried without the cause of the failure being corrected. * <p> * Please consult your driver vendor documentation for the vendor-specified * conditions for which this <code>Exception</code> may be thrown. * @since 1.6 */ ``` 2.) we probably want a better mechanism for specifying exception types to retry to ClientPoolImpl rather than just a single class. I'll let others comment, cc @jackye1995 @rdblue -- 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]
