increase keepaliveTime variance

pull/2266/head
Brett Wooldridge 2 months ago
parent ffdb8106bc
commit 8dd2535de9
No known key found for this signature in database
GPG Key ID: 4CC08E7F47C3EC76

@ -1,5 +1,9 @@
HikariCP Changes
Changes in 6.2.2
* increase keepaliveTime variance from 10% to 20%
Changes in 6.2.1
* change default keepaliveTime to 2 minutes

@ -493,8 +493,8 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag
final long keepaliveTime = config.getKeepaliveTime();
if (keepaliveTime > 0) {
// variance up to 10% of the heartbeat time
final var variance = ThreadLocalRandom.current().nextLong(keepaliveTime / 10);
// variance up to 20% of the heartbeat time
final var variance = ThreadLocalRandom.current().nextLong(keepaliveTime / 5);
final var heartbeatTime = keepaliveTime - variance;
poolEntry.setKeepalive(houseKeepingExecutorService.scheduleWithFixedDelay(new KeepaliveTask(poolEntry), heartbeatTime, heartbeatTime, MILLISECONDS));
}

Loading…
Cancel
Save