From 6320faf4145cc6abd170d3aecf34bd5fc12ce845 Mon Sep 17 00:00:00 2001 From: Brett Wooldridge <brett.wooldridge@gmail.com> Date: Wed, 21 Oct 2015 23:17:57 +0900 Subject: [PATCH 01/11] Fix test logging output. --- .../com/zaxxer/hikari/pool/TestConnectionTimeoutRetry.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/com/zaxxer/hikari/pool/TestConnectionTimeoutRetry.java b/src/test/java/com/zaxxer/hikari/pool/TestConnectionTimeoutRetry.java index 963806b2..9cdb2238 100644 --- a/src/test/java/com/zaxxer/hikari/pool/TestConnectionTimeoutRetry.java +++ b/src/test/java/com/zaxxer/hikari/pool/TestConnectionTimeoutRetry.java @@ -269,13 +269,12 @@ public class TestConnectionTimeoutRetry @Before public void before() { - TestElf.setSlf4jTargetStream(HikariPool.class, System.err); + TestElf.setSlf4jLogLevel(HikariPool.class, Level.INFO); } @After public void after() { System.getProperties().remove("com.zaxxer.hikari.housekeeping.periodMs"); - TestElf.setSlf4jLogLevel(HikariPool.class, Level.WARN); } } From ef91504692779467f64271716621981c4fa01c9b Mon Sep 17 00:00:00 2001 From: Brett Wooldridge <brett.wooldridge@gmail.com> Date: Thu, 22 Oct 2015 00:04:33 +0900 Subject: [PATCH 02/11] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bee7be30..32b840cd 100644 --- a/README.md +++ b/README.md @@ -290,9 +290,8 @@ unnecessary with modern database drivers to implement a cache at the pool level. Like Statement caching, most major database vendors support statement logging through properties of their own driver. This includes Oracle, MySQL, Derby, MSSQL, and others. Some -even support slow query logging. We consider this a "development-time" feature. For those few -databases that do not support it, [jdbcdslog-exp](https://code.google.com/p/jdbcdslog-exp/) is -a good option. Great stuff during development and pre-Production. +even support slow query logging. For those few databases that do not support it, [log4jdbc](https://github.com/arthurblake/log4jdbc) or [jdbcdslog-exp](https://code.google.com/p/jdbcdslog-exp/) are +good options. ---------------------------------------------------- From 5e6ede280aec8a8ed81dfe88a838ac0867b68813 Mon Sep 17 00:00:00 2001 From: Brett Wooldridge <brett.wooldridge@gmail.com> Date: Tue, 27 Oct 2015 21:28:53 +0900 Subject: [PATCH 03/11] Update README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 32b840cd..5b26256a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,10 @@ -<h1> HikariCP<sup><sup> It's Faster.</sup></sup><sub><sub><sup>Hi·ka·ri [hi·ka·'lē] (*Origin: Japanese*): light; ray.</sup></sub></sub></h1><br>[](https://travis-ci.org/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'>[](http://issuestats.com/github/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'>[](http://issuestats.com/github/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'>[](https://coveralls.io/r/brettwooldridge/HikariCP?branch=master)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'>[](https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0) +<h1> HikariCP<sup><sup> It's Faster.</sup></sup><sub><sub><sup>Hi·ka·ri [hi·ka·'lē] (*Origin: Japanese*): light; ray.</sup></sub></sub></h1><br> +[](https://travis-ci.org/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'> +[](http://issuestats.com/github/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'> +[](http://issuestats.com/github/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'> +[](https://coveralls.io/r/brettwooldridge/HikariCP?branch=master)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'> +[](https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0) +[![][license img]][license] Fast, simple, reliable. HikariCP is a "zero-overhead" production ready JDBC connection pool. At roughly 90Kb, the library is very light. Read about [how we do it here](https://github.com/brettwooldridge/HikariCP/wiki/Down-the-Rabbit-Hole). @@ -410,3 +416,6 @@ YourKit supports open source projects with its full-featured Java Profiler. Cli ### Contributions Please perform changes and submit pull requests from the ``dev`` branch instead of ``master``. Please set your editor to use spaces instead of tabs, and adhere to the apparent style of the code you are editing. The ``dev`` branch is always more "current" than the ``master`` if you are looking to live life on the edge. + +[license]:LICENSE-2.0.txt +[license img]:https://img.shields.io/badge/License-Apache%202-blue.svg From 26625ed2926a8cb466a6c83eb343d43fdc02f9c0 Mon Sep 17 00:00:00 2001 From: Brett Wooldridge <brett.wooldridge@gmail.com> Date: Tue, 27 Oct 2015 21:32:03 +0900 Subject: [PATCH 04/11] Update README.md --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5b26256a..3e109edf 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ <h1> HikariCP<sup><sup> It's Faster.</sup></sup><sub><sub><sup>Hi·ka·ri [hi·ka·'lē] (*Origin: Japanese*): light; ray.</sup></sub></sub></h1><br> -[](https://travis-ci.org/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'> -[](http://issuestats.com/github/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'> -[](http://issuestats.com/github/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'> -[](https://coveralls.io/r/brettwooldridge/HikariCP?branch=master)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'> +[![][Build Status img]][Build Status] +[](http://issuestats.com/github/brettwooldridge/HikariCP) +[](http://issuestats.com/github/brettwooldridge/HikariCP) +[](https://coveralls.io/r/brettwooldridge/HikariCP?branch=master) [](https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0) [![][license img]][license] @@ -417,5 +417,8 @@ YourKit supports open source projects with its full-featured Java Profiler. Cli Please perform changes and submit pull requests from the ``dev`` branch instead of ``master``. Please set your editor to use spaces instead of tabs, and adhere to the apparent style of the code you are editing. The ``dev`` branch is always more "current" than the ``master`` if you are looking to live life on the edge. +[Build Status]:https://travis-ci.org/brettwooldridge/HikariCP +[Build Status img]:https://travis-ci.org/brettwooldridge/HikariCP.svg?branch=master + [license]:LICENSE-2.0.txt [license img]:https://img.shields.io/badge/License-Apache%202-blue.svg From b1f8d12b8ad796b0158003c6dc073c9be79c76b7 Mon Sep 17 00:00:00 2001 From: Brett Wooldridge <brett.wooldridge@gmail.com> Date: Tue, 27 Oct 2015 23:55:18 +0900 Subject: [PATCH 05/11] Update README.md --- README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3e109edf..6bad9256 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ <h1> HikariCP<sup><sup> It's Faster.</sup></sup><sub><sub><sup>Hi·ka·ri [hi·ka·'lē] (*Origin: Japanese*): light; ray.</sup></sub></sub></h1><br> [![][Build Status img]][Build Status] -[](http://issuestats.com/github/brettwooldridge/HikariCP) -[](http://issuestats.com/github/brettwooldridge/HikariCP) -[](https://coveralls.io/r/brettwooldridge/HikariCP?branch=master) -[](https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0) +[![][Issue Stats img]][Issue Stats] +[![][Coverage Status img]][Coverage Status] +[![][Dependency Status img]][Dependency Status] [![][license img]][license] Fast, simple, reliable. HikariCP is a "zero-overhead" production ready JDBC connection pool. At roughly 90Kb, the library is very light. Read about [how we do it here](https://github.com/brettwooldridge/HikariCP/wiki/Down-the-Rabbit-Hole). @@ -420,5 +419,14 @@ Please perform changes and submit pull requests from the ``dev`` branch instead [Build Status]:https://travis-ci.org/brettwooldridge/HikariCP [Build Status img]:https://travis-ci.org/brettwooldridge/HikariCP.svg?branch=master +[Issue Stats]:http://issuestats.com/github/brettwooldridge/HikariCP +[Issue Stats img]:http://issuestats.com/github/brettwooldridge/HikariCP/badge/issue?style=flat&concise=true + +[Coverage Status]:https://coveralls.io/r/brettwooldridge/HikariCP?branch=master +[Coverage Status img]:https://coveralls.io/repos/brettwooldridge/HikariCP/badge.svg?branch=master + +[Dependency Status]:https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0 +[Dependency Status img]:https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0/badge.svg?style=flat + [license]:LICENSE-2.0.txt [license img]:https://img.shields.io/badge/License-Apache%202-blue.svg From 8230dcb9d57139a919e37e1500f4f5c652c10771 Mon Sep 17 00:00:00 2001 From: Brett Wooldridge <brett.wooldridge@gmail.com> Date: Wed, 28 Oct 2015 21:29:05 +0900 Subject: [PATCH 06/11] Update dependencies. --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0bac4af3..68d9b662 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <felix.bundle.plugin.version>3.0.0</felix.bundle.plugin.version> - <felix.version>5.2.0</felix.version> + <felix.version>5.4.0</felix.version> <hibernate.version>5.0.2.Final</hibernate.version> <javassist.version>3.20.0-GA</javassist.version> <jndi.version>0.11.4.1</jndi.version> @@ -325,7 +325,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>2.18.1</version> + <version>2.19</version> <configuration> <!-- Sets the VM argument line used when unit tests are run. --> <argLine>${surefireArgLine}</argLine> From b52a1e30928f9089b77ea0f69fe43e818af81b3b Mon Sep 17 00:00:00 2001 From: Brett Wooldridge <brett.wooldridge@gmail.com> Date: Sat, 31 Oct 2015 21:56:24 +0900 Subject: [PATCH 07/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6bad9256..15f18e6f 100644 --- a/README.md +++ b/README.md @@ -428,5 +428,5 @@ Please perform changes and submit pull requests from the ``dev`` branch instead [Dependency Status]:https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0 [Dependency Status img]:https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0/badge.svg?style=flat -[license]:LICENSE-2.0.txt +[license]:LICENSE [license img]:https://img.shields.io/badge/License-Apache%202-blue.svg From bcd5c230e279935a88b902a495b35f58a6f68560 Mon Sep 17 00:00:00 2001 From: Nitin <nitinchauhan@hotmail.com> Date: Mon, 2 Nov 2015 13:07:37 +0530 Subject: [PATCH 08/11] if minimumIdle > maxPoolSize, no need to set maxPoolSize too --- src/main/java/com/zaxxer/hikari/HikariConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/zaxxer/hikari/HikariConfig.java b/src/main/java/com/zaxxer/hikari/HikariConfig.java index 4c280246..7ca2244f 100644 --- a/src/main/java/com/zaxxer/hikari/HikariConfig.java +++ b/src/main/java/com/zaxxer/hikari/HikariConfig.java @@ -788,7 +788,7 @@ public class HikariConfig implements HikariConfigMXBean } if (minIdle < 0 || minIdle > maxPoolSize) { - minIdle = maxPoolSize; + maxPoolSize = minIdle; } if (maxLifetime < 0) { From bc619c30325f4426e5baf7825ef28a0f93dbfad8 Mon Sep 17 00:00:00 2001 From: Nitin <nitinchauhan@hotmail.com> Date: Mon, 2 Nov 2015 13:13:23 +0530 Subject: [PATCH 09/11] Issue#483 --- src/main/java/com/zaxxer/hikari/HikariConfig.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/zaxxer/hikari/HikariConfig.java b/src/main/java/com/zaxxer/hikari/HikariConfig.java index 7ca2244f..603b3f6d 100644 --- a/src/main/java/com/zaxxer/hikari/HikariConfig.java +++ b/src/main/java/com/zaxxer/hikari/HikariConfig.java @@ -787,7 +787,11 @@ public class HikariConfig implements HikariConfigMXBean validationTimeout = connectionTimeout; } - if (minIdle < 0 || minIdle > maxPoolSize) { + if (minIdle < 0) { + minIdle = maxPoolSize; + } + + if (minIdle > maxPoolSize) { maxPoolSize = minIdle; } From 51a43780bdc89c1d95c3d4dc1509ff5deb4cef4d Mon Sep 17 00:00:00 2001 From: Nitin <nitinchauhan@hotmail.com> Date: Mon, 2 Nov 2015 18:45:50 +0530 Subject: [PATCH 10/11] if idleTimeout > maxLifetime, no need to set maxLifetime too --- src/main/java/com/zaxxer/hikari/HikariConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/zaxxer/hikari/HikariConfig.java b/src/main/java/com/zaxxer/hikari/HikariConfig.java index 603b3f6d..fd146405 100644 --- a/src/main/java/com/zaxxer/hikari/HikariConfig.java +++ b/src/main/java/com/zaxxer/hikari/HikariConfig.java @@ -810,6 +810,7 @@ public class HikariConfig implements HikariConfigMXBean } if (idleTimeout + TimeUnit.SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0) { LOGGER.warn("idleTimeout is close to or greater than maxLifetime, disabling it."); + maxLifetime = idleTimeout; idleTimeout = 0; } if (maxLifetime == 0 && idleTimeout == 0) { From 7151cbebf1efa1a2800c14ce704611cf5ce0c680 Mon Sep 17 00:00:00 2001 From: Nitin <nitinchauhan@hotmail.com> Date: Mon, 2 Nov 2015 20:50:00 +0530 Subject: [PATCH 11/11] elseif --- src/main/java/com/zaxxer/hikari/HikariConfig.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/zaxxer/hikari/HikariConfig.java b/src/main/java/com/zaxxer/hikari/HikariConfig.java index fd146405..0cf8da6b 100644 --- a/src/main/java/com/zaxxer/hikari/HikariConfig.java +++ b/src/main/java/com/zaxxer/hikari/HikariConfig.java @@ -790,8 +790,7 @@ public class HikariConfig implements HikariConfigMXBean if (minIdle < 0) { minIdle = maxPoolSize; } - - if (minIdle > maxPoolSize) { + else if (minIdle > maxPoolSize) { maxPoolSize = minIdle; }