kfaraz commented on code in PR #14271:
URL: https://github.com/apache/druid/pull/14271#discussion_r1200418570


##########
server/src/main/java/org/apache/druid/metadata/SQLMetadataConnector.java:
##########
@@ -165,14 +166,21 @@ public <T> T retryTransaction(final 
TransactionCallback<T> callback, final int q
 
   public final boolean isTransientException(Throwable e)
   {
-    return e != null && (e instanceof RetryTransactionException
-                         || e instanceof SQLTransientException
-                         || e instanceof SQLRecoverableException
-                         || e instanceof UnableToObtainConnectionException
-                         || e instanceof UnableToExecuteStatementException
-                         || connectorIsTransientException(e)
-                         || (e instanceof SQLException && 
isTransientException(e.getCause()))
-                         || (e instanceof DBIException && 
isTransientException(e.getCause())));
+    if (e == null) {
+      return false;
+    }
+    if (e.getMessage() != null && 
e.getMessage().contains(MAX_ALLOWED_PACKET_ERROR)) {

Review Comment:
   I tried using a MariaDB driver instead and this is what I got:
   
   ```
   org.skife.jdbi.v2.exceptions.CallbackFailedException: 
     org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException:
       java.sql.SQLTransientConnectionException:
         org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException
           java.sql.SQLNonTransientConnectionException
             org.mariadb.jdbc.internal.util.exceptions.MaxAllowedPacketException
   ```
   
   The weird thing is that the `SQLTransientConnectionException` is eventually 
caused by a `SQLNonTransientConnectionException`.
   
   The SQLState in this case is `HY` which is pretty generic ([MariaDB 
docs](https://mariadb.com/kb/en/sqlstate/), and error code (vendor code) is 
again 0.



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