Commit Graph

302 Commits (2f02bfd0cd2655afe55ea245812b88f705ec7977)

Author SHA1 Message Date
Yanming Zhou 2f02bfd0cd Use volatile field instead of AtomicReference
it's not necessary to use `AtomicReference` here since the result of atomic method `updateAndGet()` is unused, and not necessary to use `AtomicReferenceFieldUpdater` here since only `set()` is using, volatile field access is more appropriate.
5 months ago
Brett Wooldridge d54418061f "merged" #2126 Added Support For beginRequest and endRequest (new version) 6 months ago
Thomas Aregger a671b6e24d
Close connections marked as evicted instead of returning them to the pool (#2157) 6 months ago
VJ b3e6d23dc5
Consistent handling of errorCode and sqlState in timeout exception (#2226)
Co-authored-by: the-vj <one.vallu@gmail.com>
6 months ago
Brett Wooldridge 7ec98c3ee2 Minor debug logging change. 6 months ago
Brett Wooldridge f601340304 Minor debug logging change. 6 months ago
James Christian 0a6ccdb334 Only log 'Connection not added' when connection not added 1 year ago
Jeff Fang 61ac830709
Remove error log for pool initialization exception (#1660)
Co-authored-by: Jeff Fang <jeff.fang@activenetwork.com>
2 years ago
Brett Wooldridge 69394742a6 Add pool stats to connection acquisition timeout exception 3 years ago
Brett Wooldridge 3104292f68 Minor code cleanups. 3 years ago
Brett Wooldridge fbd2a18910 Add log when connection not added. 3 years ago
Brett Wooldridge c2148006ce Simplify connection creation. 3 years ago
Brett Wooldridge ed2da5f1f4 Fix idle timeout tests, sleep too tight to idle threshold. (+1 squashed commit)
Squashed commits:
[4844f9e1] Fix idle timeout tests, sleep too tight to idle threshold. (+8 squashed commits)
Squashed commits:
[e0ec6b7f] Fix idle timeout tests, sleep too tight to idle threshold.
[c40a690d] Fix idle timeout tests, sleep too tight to idle threshold.
[7a0a1560] Synchronize idleTimeout manipulation methods
[bab9f648] Fix idle timeout tests, sleep too tight to idle threshold.
[4ee5259b] Add missing ) character in message
[e9d49fc2] Enable debug logging for tests.
[89c1ab45] Fix idle timeout tests, sleep too tight to idle threshold.
[aa06bb85] Simplify pool entry last-accessed time handling.
4 years ago
Brett Wooldridge 1991355e6b Convert to Java 11 4 years ago
Brett Wooldridge d0c7d54bc9 Fix regression cause by #1605. When returning the addConnectionExecutor pool sizes
back to defaults, the core pool size must be changed before the maximum pool size.
4 years ago
Brett Wooldridge 04919ad540 lint cleanup and Visual Studio Code files 4 years ago
Brett Wooldridge ade83d14cd Code cleanup. 4 years ago
nothing 0561309e32
features: add heartbeat to keepalive connection if configure it (#1699)
* features: add heartbeat to keepalive connection if configure it

* features: add heartbeat to keepalive connection if configure it

* features: add heartbeat to keepalive connection if configure it

* features: keepalive unit test

* optimize code

* optimize code
4 years ago
sw-pachanady 00f5f202a4
Due to change in JDK-11 and later in ThreadPoolExecutor.java, setMaximumPoolSize needs to be done before setCorePoolSize, the current implementation throws IllegalArgumentException and hence prefilling of connections by setting com.zaxxer.hikari.blockUntilFilled is broken. (#1605)
Co-authored-by: rampr_000 <spachanady@gmail.com>
4 years ago
Brett Wooldridge 8df41bf748 Additional logging. 5 years ago
Brett Wooldridge fe29962233 When blocking initialization is specified, use a minimum of 16 connection creation threads. 5 years ago
Brett Wooldridge 93c7178012 Fixes #1528 regression in fail fast handling. 5 years ago
Brett Wooldridge e8e9cdd00a fixes #1287 set core pool size before max pool size 6 years ago
Brett Wooldridge 1ac94f16a2 Fixes #1287 when system property blockUntilFilled is set, use multiple threads to fill the pool. 6 years ago
Brett Wooldridge f005a4769f Various clean-ups pointed out by sonarcloud.io 6 years ago
Matt Nelson 471e27ece0 Use orElseGet to delay call until necessary (#1210) 7 years ago
Jungtaek Lim 74fa2a84e8 Log uncaught error in acquiring connection (+1 squashed commit)
Squashed commits:
[7a00d8bd]

* also respecting fail-fast on uncaught error
7 years ago
Brett Wooldridge b5c340eee3 Permit changing the catalog via the HikariConfigMXBean 7 years ago
Brett Wooldridge 00cd48a7c8 Fixes #1117 Add (currently undocumented) system property to block pool startup until minimumIdle connections exist in the pool. 7 years ago
Manabu Matsuzaki 3313174891 Add pool metrics (#1110) 7 years ago
Brett Wooldridge 7bff6723c1 Fixes #1095 fix breakage caused by sealed configuration with respect to special handling
for the metricsRegistry and metricsTrackerFactory properties, which are allowed to be
altered *once* after the pool has started.
7 years ago
NersesAM 91bd7dfb33 Allowing anonymous subclasses of MetricRegistry. Also changing checks for metrics libraries from classname contains to assignableFrom the metrics class (#1089) 7 years ago
Stephan Schroevers 4a4c139654 Fix Java file permissions (#1015)
Some files were inadvertently marked executable.
7 years ago
Brett Wooldridge 4b796b5209 Clean up and better JavaDoc. 7 years ago
Brett Wooldridge d6a9cd435c Fixes #983 fix logic that determines how many idle connections can be removed, without violating the minimumIdle contract. 8 years ago
Brett Wooldridge 6735fcfe3a Closes #989 Merged the parts I agree with. 8 years ago
Brett Wooldridge 2a9e0185e4 Fix NPE caused by merge. 8 years ago
Johno Crawford 43b423cc5a Log better message when connection was evicted or dead. (#977) 8 years ago
Arthur Gavlyukovskiy 63f6ff371f Fixed ClassNotFoundException when com.codahale.metrics.MetricRegistry is not in the classpath (#984)
* Fixed ClassNotFoundException when com.codahale.metrics.MetricRegistry is not in the classpath

* Changed equals to contains to handle CompositeMeterRegistry
8 years ago
Brett Wooldridge 051f78c276 Alpha-level support for micrometer metrics 8 years ago
Brett Wooldridge 47b827d11e Fixes #929 length the shutdown timeouts to 10 seconds. Beyond this,
user's need to poll the pool themselves if they want to wait for all the
connections to disappear.
8 years ago
Andreas Brenk 2a0a065b24 Introduce factory for leak detection tasks (#943)
This change splits off a ProxyLeakTaskFactory from the ProxyLeakTask class
so that scheduling the task is done after its constructor completes. This
prevents publishing the tasks "this" reference during construction.

See "Safe construction techniques" by Brian Goetz.
8 years ago
Brett Wooldridge 61be9b923d Fixes #880 Fix race condition caused by sorting collection
while the condition of sort can change.
8 years ago
will vuong e7a3e39f9b Better place to capture pool.Wait metric (#831)
@wvuong Thanks.  Yes, that is better.
8 years ago
Will Vuong d875e838c3 pool.Wait metric doesn't include timed out requests
We noticed that the pool.Wait metric only captured the timings for successful connection requests and doesn't capture when a connection request times out.

I didn't want to mess with IMetricsTrackerDelegate.recordBorrowStats() so I created a recordBorrowTimeoutStats() and implementation in MetricsTrackerDelegate instead.  Feel free to tweak to your liking.
8 years ago
Brett Wooldridge 0ab35e7445 Minor cleanup. 8 years ago
Brett Wooldridge 2414ebdaa4 Queue immediate replacement of retired maxLifetime connection. 8 years ago
Brett Wooldridge ef7da7dad4 Minor cleanup. 8 years ago
Brett Wooldridge ea3043dea2 Fixes #817 restore former failfast=false behavior by completely
bypassing the connection validation if initializationFailTimeout is
negative.
8 years ago
Brett Wooldridge 1587198e6a Change the internal handling of the initializationFailTimeout. 8 years ago