|
|
@ -552,15 +552,15 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* If initializationFailFast is configured, check that we have DB connectivity.
|
|
|
|
* If {@code initializationFailTimeout} is configured, check that we have DB connectivity.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @throws PoolInitializationException if fails to create or validate connection
|
|
|
|
* @throws PoolInitializationException if fails to create or validate connection
|
|
|
|
* @see HikariConfig#setInitializationFailTimeout(long)
|
|
|
|
* @see HikariConfig#setInitializationFailTimeout(long)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void checkFailFast()
|
|
|
|
private void checkFailFast()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
final var initializationTimeout = config.getInitializationFailTimeout();
|
|
|
|
final var initializationFailTimeout = config.getInitializationFailTimeout();
|
|
|
|
if (initializationTimeout < 0) {
|
|
|
|
if (initializationFailTimeout < 0) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -584,9 +584,9 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
quietlySleep(SECONDS.toMillis(1));
|
|
|
|
quietlySleep(SECONDS.toMillis(1));
|
|
|
|
} while (elapsedMillis(startTime) < initializationTimeout);
|
|
|
|
} while (elapsedMillis(startTime) < initializationFailTimeout);
|
|
|
|
|
|
|
|
|
|
|
|
if (initializationTimeout > 0) {
|
|
|
|
if (initializationFailTimeout > 0) {
|
|
|
|
throwPoolInitializationException(getLastConnectionFailure());
|
|
|
|
throwPoolInitializationException(getLastConnectionFailure());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|