|
|
|
@ -824,16 +824,16 @@ public class HikariConfig implements HikariConfigMXBean
|
|
|
|
|
maxLifetime = MAX_LIFETIME;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (idleTimeout + SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0) {
|
|
|
|
|
LOGGER.warn("{} - idleTimeout is close to or more than maxLifetime, disabling it.", poolName);
|
|
|
|
|
idleTimeout = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (idleTimeout != 0 && idleTimeout < SECONDS.toMillis(10)) {
|
|
|
|
|
LOGGER.warn("{} - idleTimeout is less than 10000ms, setting to default {}ms.", poolName, IDLE_TIMEOUT);
|
|
|
|
|
idleTimeout = IDLE_TIMEOUT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (idleTimeout + SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0) {
|
|
|
|
|
LOGGER.warn("{} - idleTimeout is close to or more than maxLifetime, disabling it.", poolName);
|
|
|
|
|
idleTimeout = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (maxLifetime == 0 && idleTimeout == 0) {
|
|
|
|
|
LOGGER.warn("{} - setting idleTimeout to {}ms.", poolName, IDLE_TIMEOUT);
|
|
|
|
|
idleTimeout = IDLE_TIMEOUT;
|
|
|
|
@ -842,15 +842,10 @@ public class HikariConfig implements HikariConfigMXBean
|
|
|
|
|
if (leakDetectionThreshold > 0 && !unitTest) {
|
|
|
|
|
if (leakDetectionThreshold < SECONDS.toMillis(2) || (leakDetectionThreshold > maxLifetime && maxLifetime > 0)) {
|
|
|
|
|
LOGGER.warn("{} - leakDetectionThreshold is less than 2000ms or more than maxLifetime, disabling it.", poolName);
|
|
|
|
|
leakDetectionThreshold = 0L;
|
|
|
|
|
leakDetectionThreshold = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (validationTimeout < 250) {
|
|
|
|
|
LOGGER.warn("{} - validationTimeout is less than 250ms, setting to {}ms.", poolName, VALIDATION_TIMEOUT);
|
|
|
|
|
validationTimeout = VALIDATION_TIMEOUT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (connectionTimeout != Integer.MAX_VALUE) {
|
|
|
|
|
if (connectionTimeout < 250) {
|
|
|
|
|
LOGGER.warn("{} - connectionTimeout is less than 250ms, setting to {}ms.", poolName, CONNECTION_TIMEOUT);
|
|
|
|
@ -868,6 +863,11 @@ public class HikariConfig implements HikariConfigMXBean
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (validationTimeout < 250) {
|
|
|
|
|
LOGGER.warn("{} - validationTimeout is less than 250ms, setting to {}ms.", poolName, VALIDATION_TIMEOUT);
|
|
|
|
|
validationTimeout = VALIDATION_TIMEOUT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (maxPoolSize < 0) {
|
|
|
|
|
if (minIdle < 0) {
|
|
|
|
|
minIdle = 10;
|
|
|
|
|