You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "amogh-jahagirdar (via GitHub)" <gi...@apache.org> on 2023/03/23 20:54:24 UTC

[GitHub] [iceberg] amogh-jahagirdar commented on issue #7173: Does JDBC connector uses any retry mechanism?

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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org