Merge commit '49be257130ba7bc3080f5bc8a0f191db86f23394' into dev

* commit '49be257130ba7bc3080f5bc8a0f191db86f23394':
  commented log & added changes removed from old commit
  align log with 'Before cleanup'
pull/445/head
Brett Wooldridge 9 years ago
commit ea680f7ff5

@ -2,6 +2,24 @@ HikariCP Changes
Changes in 2.4.2 Changes in 2.4.2
* Improve accuracy of timeouts for getConnection() calls by accounting for possibly
long delay aliveness tests.
* Improve adherence to minimumIdle goal by closing idle connections starting from
longest idle time to shortest. Additionally, stop when minimumIdle is reached even
if connections exceeding idleTimeout remain (but are still within maxLifetime).
* Ongoing com.zaxxer.hikari.metrics refactors. This is not considered public API until
such time as we announce it. Caveat lector.
* Performance improvements in the getConnection()/close() hot path.
* issue 415: remove use of java.beans classes to allow use of HikariCP with the
Zulu JRE compact3 profile.
* issue 406: execute validation query during connection setup to make sure it is
valid SQL.
* Fixed issue with proxy generation whereby the generated classes contain the * Fixed issue with proxy generation whereby the generated classes contain the
major version number for Java 8, which makes them incompatible with the Java 7 major version number for Java 8, which makes them incompatible with the Java 7
runtime. runtime.

@ -442,6 +442,7 @@ public class HikariPool extends PoolBase implements HikariPoolMXBean, IBagStateL
// Speculative increment of totalConnections with expectation of success // Speculative increment of totalConnections with expectation of success
if (totalConnections.incrementAndGet() > config.getMaximumPoolSize()) { if (totalConnections.incrementAndGet() > config.getMaximumPoolSize()) {
totalConnections.decrementAndGet(); // Pool is maxed out, so undo speculative increment of totalConnections totalConnections.decrementAndGet(); // Pool is maxed out, so undo speculative increment of totalConnections
//LOGGER.debug("{} - Cannot exceed maximum connections capacity: {}", poolName, config.getMaximumPoolSize());
return true; return true;
} }
@ -487,7 +488,7 @@ public class HikariPool extends PoolBase implements HikariPoolMXBean, IBagStateL
addConnectionExecutor.execute(new Runnable() { addConnectionExecutor.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
logPoolState("After fill\t"); logPoolState("After adding\t");
} }
}); });
} }

@ -236,7 +236,7 @@ public class TestConnectionTimeoutRetry
Thread.sleep(2000); Thread.sleep(2000);
Assert.assertSame("Totals connections not as expected", 10, TestElf.getPool(ds).getTotalConnections()); Assert.assertSame("Total connections not as expected", 10, TestElf.getPool(ds).getTotalConnections());
Assert.assertSame("Idle connections not as expected", 3, TestElf.getPool(ds).getIdleConnections()); Assert.assertSame("Idle connections not as expected", 3, TestElf.getPool(ds).getIdleConnections());
connection1.close(); connection1.close();

Loading…
Cancel
Save