jbonofre commented on code in PR #10140: URL: https://github.com/apache/iceberg/pull/10140#discussion_r1565313138
########## core/src/main/java/org/apache/iceberg/jdbc/JdbcClientPool.java: ########## @@ -21,17 +21,27 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; -import java.sql.SQLNonTransientConnectionException; +import java.sql.SQLTransientException; +import java.util.Arrays; import java.util.Map; import java.util.Properties; +import java.util.Set; +import java.util.stream.Collectors; import org.apache.iceberg.CatalogProperties; import org.apache.iceberg.ClientPoolImpl; +import org.apache.iceberg.relocated.com.google.common.collect.ImmutableSet; +import org.apache.iceberg.relocated.com.google.common.collect.Sets; public class JdbcClientPool extends ClientPoolImpl<Connection, SQLException> { private final String dbUrl; private final Map<String, String> properties; + private Set<String> retryableStatusCodes; + + private static final Set<String> COMMON_RETRYABLE_CONNECTION_SQL_STATES = Review Comment: Maybe make it by default but also configurable (not necessarily in this PR). For instance, in ActiveMQ JDBC Store, I did some special handling specific to vendor (some SQL states are specific to vendor). I can include that in my PR (in preparation) working with multiple vendors. ########## core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java: ########## @@ -72,6 +72,7 @@ public class JdbcCatalog extends BaseMetastoreViewCatalog implements Configurable<Object>, SupportsNamespaces { public static final String PROPERTY_PREFIX = "jdbc."; + public static final String RETRYABLE_STATUS_CODES = "retryable_status_codes"; Review Comment: To be consistent, I would move this property in `JdbcUtil` as it's where all properties are located. -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org