You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If retryable error codes are configured, and JDBC catalog connection pool tries to retry action more than once (for example, when database is restarting), it fails with ClassCastException if the JDBC driver exception class does not extend SQLTransientException.
Issue stack trace:
java.lang.ClassCastException: Cannot cast org.postgresql.util.PSQLException to java.sql.SQLTransientException
at java.lang.Class.cast(Class.java:3890)
at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:85)
at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65)
at org.apache.iceberg.jdbc.JdbcUtil.tableOrView(JdbcUtil.java:598)
....
Apache Iceberg version
1.6.1 (latest release)
Query engine
None
Please describe the bug 🐞
If retryable error codes are configured, and JDBC catalog connection pool tries to retry action more than once (for example, when database is restarting), it fails with
ClassCastException
if the JDBC driver exception class does not extend SQLTransientException.Issue stack trace:
The problem is that in
ClientPoolImpl
line 85 (https://github.com/apache/iceberg/blob/apache-iceberg-1.6.1/core/src/main/java/org/apache/iceberg/ClientPoolImpl.java#L85), there is unconditional cast of the driver exception toreconnectExc
, whichJdbcClientPool
sets toSQLTransientException
in the call to superclass (ClientPoolImpl
) constructor: https://github.com/apache/iceberg/blob/apache-iceberg-1.6.1/core/src/main/java/org/apache/iceberg/jdbc/JdbcClientPool.java#L69Postgresql JDBC driver uses
PSQLException
for all exceptions and this class does not extendSQLTransientException
so the cast fails.Willingness to contribute
The text was updated successfully, but these errors were encountered: