|
|
|
@ -1387,7 +1387,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
|
|
|
|
|| realDriverClassName.equals(JdbcConstants.POLARDB_DRIVER)) { |
|
|
|
|
this.validConnectionChecker = new PGValidConnectionChecker(); |
|
|
|
|
} else if (realDriverClassName.equals(JdbcConstants.OCEANBASE_DRIVER) |
|
|
|
|
|| (realDriverClassName.equals(JdbcConstants.OCEANBASE_DRIVER2))) { |
|
|
|
|
|| (realDriverClassName.equals(JdbcConstants.OCEANBASE_DRIVER2))) { |
|
|
|
|
DbType dbType = DbType.of(this.dbTypeName); |
|
|
|
|
this.validConnectionChecker = new OceanBaseValidConnectionChecker(dbType); |
|
|
|
|
} |
|
|
|
@ -1482,7 +1482,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
|
|
|
|
try { |
|
|
|
|
poolableConnection = getConnectionInternal(maxWaitMillis); |
|
|
|
|
} catch (GetConnectionTimeoutException ex) { |
|
|
|
|
if (notFullTimeoutRetryCnt <= this.notFullTimeoutRetryCount && !isFull()) { |
|
|
|
|
if (notFullTimeoutRetryCnt < this.notFullTimeoutRetryCount && !isFull()) { |
|
|
|
|
notFullTimeoutRetryCnt++; |
|
|
|
|
if (LOG.isWarnEnabled()) { |
|
|
|
|
LOG.warn("get connection timeout retry : " + notFullTimeoutRetryCnt); |
|
|
|
@ -1830,7 +1830,11 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
|
|
|
|
String errorMessage = buf.toString(); |
|
|
|
|
|
|
|
|
|
if (createError != null) { |
|
|
|
|
throw new GetConnectionTimeoutException(errorMessage, createError); |
|
|
|
|
if (createError instanceof SQLException) { |
|
|
|
|
throw (SQLException)createError; |
|
|
|
|
} else { |
|
|
|
|
throw new GetConnectionTimeoutException(errorMessage, createError); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
throw new GetConnectionTimeoutException(errorMessage); |
|
|
|
|
} |
|
|
|
|