singhpk234 commented on code in PR #7561:
URL: https://github.com/apache/iceberg/pull/7561#discussion_r1188122055


##########
core/src/main/java/org/apache/iceberg/jdbc/JdbcClientPool.java:
##########
@@ -21,17 +21,22 @@
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.SQLException;
-import java.sql.SQLNonTransientConnectionException;
+import java.sql.SQLTransientException;
 import java.util.Map;
 import java.util.Properties;
+import java.util.Set;
 import org.apache.iceberg.CatalogProperties;
 import org.apache.iceberg.ClientPoolImpl;
+import org.apache.iceberg.relocated.com.google.common.collect.ImmutableSet;
 
 public class JdbcClientPool extends ClientPoolImpl<Connection, SQLException> {
 
   private final String dbUrl;
   private final Map<String, String> properties;
 
+  private static final Set<String> RETRYABLE_CONNECTION_SQL_STATES =
+      ImmutableSet.of("08000", "08003", "08006", "08004", "08007");

Review Comment:
   Any reason for including 
   - 08004 As per doc look like it's due to sql rejecting the connection. 
refering this doc of pg-jdbc driver mentioned in description above 
[doc](https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/util/PSQLState.java#LL31C1-L36C32)
 : 
   ```  /**
      * The server rejected our connection attempt. Usually an authentication 
failure, but could be a
      * configuration error like asking for a SSL connection with a server that 
wasn't built with SSL
      * support.
      */
     CONNECTION_REJECTED("08004"), 
   ```



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