Brett Wooldridge
ddf24ad848
Validation corrections.
10 years ago
Brett Wooldridge
8af2bc551a
Fix #236 via workaround for MySQL issue http://bugs.mysql.com/bug.php?id=75615
10 years ago
Brett Wooldridge
34e58dfb2b
Minor cleanup.
10 years ago
Brett Wooldridge
c24e6d56bb
Fix #236 use a synchronous Executor to execute setNetworkConnection() to avoid race conditions.
10 years ago
Brett Wooldridge
2eefb6d4cd
Checkpoint check-in, this is not final code at all...
10 years ago
Brett Wooldridge
b544c21cf3
Add validationTimeout.
10 years ago
Brett Wooldridge
898206f81c
Fix #231 Make the copyState() method public to facilitate wrappers who want to copy/modify the configuration for use in multiple pool instances.
10 years ago
Brett Wooldridge
28438642d8
Make initializationFailFast fail faster.
10 years ago
Brett Wooldridge
1a99e4ca2c
We have the driver as member, so let's use it.
10 years ago
Brett Wooldridge
8d58c28077
Remove use of method unsupported by Java 6
10 years ago
Brett Wooldridge
5ea5688db3
Start the housekeeping thread first run after the default interval (30 seconds) rather than hardcoded 10 seconds.
10 years ago
Brett Wooldridge
684d0683e9
Idle fill is now run by the housekeeping thread, rather than as a side-effect of addBagItem(), so for this test we need to set a short housekeeping period.
10 years ago
Brett Wooldridge
3ccddff117
Reset housekeeping period after test.
10 years ago
Brett Wooldridge
dc5771e679
Suppress IDE deprecation warnings.
10 years ago
Brett Wooldridge
94be387dcc
Clarify boolean order of operations in getConnection() conditional. Run fillPool() on the caller thread.
10 years ago
Brett Wooldridge
8aa2034709
Fixes #222 separate responsibility of maintaining idle connections from addBagItem(). addBagItem() will now add exactly one connection per-invocation (with retry). Create a separate fillPool() method to handle idle connection maintenance.
10 years ago
Brett Wooldridge
f6b0ee5ab9
#215 don't return evicted connections ever
10 years ago
Brett Wooldridge
fafcd38a56
Fix #220 continue to override isClosed() ... we had removed it but it should reflect HikariCP's understanding of the closed state rather than delegating to the driver.
10 years ago
Brett Wooldridge
6017c8019b
Fix #221 handle getResultSet()
10 years ago
Brett Wooldridge
5de373148c
Don't throw exceptions that might disrupt executor threads, but do log. Plus, don't trust nanoTime() implementations on all platforms not to go backwards due to NTP adjustments.
10 years ago
Brett Wooldridge
937923666e
Don't reset isNetworkTimeoutSupported here, but do log a warning on exception
10 years ago
Brett Wooldridge
c3043d8f9d
Re-use the assassin executor.
10 years ago
Brett Wooldridge
96a71da526
If tryAcquireSharedNanos() returns false, we timed out, just return immediately.
10 years ago
Brett Wooldridge
e5d4cf4f11
Change longValue() call to get()
10 years ago
Brett Wooldridge
3f64f5c432
JavaDoc fixes.
10 years ago
Brett Wooldridge
3fbcbf87b5
When resetting the network timeout to its original value we can avoid an additional call to
...
getNetworkTimeout() by adding a specialized version of the method.
10 years ago
Brett Wooldridge
f97d66e554
Move GlobalPoolLock and PoolUtilities into the pool package.
10 years ago
Brett Wooldridge
f4818f535e
Expose suspend/resumePool on the HikariDataSource (not just via JMX)
10 years ago
Brett Wooldridge
a786a6be32
Loosen visibility requirements on isNetworkTimeoutSupported and isQueryTimeoutSupported, at the minor cost of initial re-execution by different threads.
10 years ago
Brett Wooldridge
ea1c2c590a
Slightly kinder, gentler shutdown.
10 years ago
Brett Wooldridge
6b63583b0e
Minor cleanup.
10 years ago
Brett Wooldridge
b9edd7de18
Minor cleanup.
10 years ago
Brett Wooldridge
3f746b7afb
Variable renames, and additional debug logging.
10 years ago
Brett Wooldridge
0fe27651fb
Mark getConnection() that takes a username/password as deprecated. Really user's should be creating separate pools for this use-case.
10 years ago
Brett Wooldridge
1eebf31c05
Minor tightening of the code. Thanks, Nitin.
10 years ago
Brett Wooldridge
e9dc9608c9
Don't decrement timeout by deltas between intervals that may be below the resolution of nanoTime(), use an absolute base and recalculate the timeout.
10 years ago
Brett Wooldridge
a386815d7e
Revert "Use System.nanoTime() instead of System.currentTimeMillis() almost everywhere. System.currentTimeMillis() can go backwards!"
...
This reverts commit 01bebb5d35
.
10 years ago
Brett Wooldridge
2260cc2e5f
Make the addConnection() method a little more DRY
10 years ago
Brett Wooldridge
9e16052edf
Remove unnecessary throw
10 years ago
Brett Wooldridge
076e90b888
Test unwrap exception for Hibernate
10 years ago
Brett Wooldridge
81885290ed
Remove unnecessary return
10 years ago
Brett Wooldridge
a855c59b67
Debug log failed closes.
10 years ago
Brett Wooldridge
8a2e523c41
Handle edge-case where resolution of System.nanoTime() can yield zero elapsed time on busy systems.
10 years ago
Brett Wooldridge
01bebb5d35
Use System.nanoTime() instead of System.currentTimeMillis() almost everywhere. System.currentTimeMillis() can go backwards!
10 years ago
Brett Wooldridge
61e6603e2c
Refactor to remove AbstractBagEntry
10 years ago
Brett Wooldridge
1ebb08b532
Pass along naming exceptions, rather than wrapping them.
10 years ago
Brett Wooldridge
beb3fa4ebd
Minor cleanup.
10 years ago
Brett Wooldridge
ac7268f3c3
Minor cleanup.
10 years ago
Brett Wooldridge
d48b733221
Mark properties for deprecation.
10 years ago
Brett Wooldridge
0323a7dacb
Let PoolUtilities use its own executor. Sharing executors can lead to deadlocks (not observed, but theoretical)
10 years ago
Brett Wooldridge
32fa545e0f
Attempt to bound how long a connection.close() call can take to 30 seconds on JDBC41 drivers.
10 years ago
Brett Wooldridge
a195e7781a
Attempt to bound how long a connection.close() call can take to 30 seconds on JDBC41 drivers.
10 years ago
Brett Wooldridge
aa38e43195
Merged #216 proposed fix into isJava40Compliant()
10 years ago
Brett Wooldridge
b77806e0e4
Bump up the _first run_ of the housekeeper a bit.
10 years ago
Brett Wooldridge
01ea53732b
It helps to use the write value in an assertion.
10 years ago
Brett Wooldridge
375a8330e2
Last timing error?
10 years ago
Brett Wooldridge
72dd6f67ba
Remove unused import.
10 years ago
Brett Wooldridge
59c45c6e5f
After fillPool() change ... timing whack-a-mole game time.
10 years ago
Brett Wooldridge
c0047c7c46
Timing tests are a b*tch.
10 years ago
Brett Wooldridge
79ec2bc976
Timing tests are a b*tch.
10 years ago
Brett Wooldridge
63baa9ab5e
Give the pool a few beats to "settle" before asserting against counts that are arrived at asynchronously.
10 years ago
Brett Wooldridge
21f8f843c1
Tighter code.
10 years ago
Brett Wooldridge
58fccbd06c
I like this variant better.
10 years ago
Brett Wooldridge
cd3af22e29
Nitin thinks this is more readable. Not sure I agree, but I don't care enough to argue.
10 years ago
Brett Wooldridge
3d80609d6a
Nitin thinks this is more readable. Not sure I agree, but I don't care enough to argue.
10 years ago
Brett Wooldridge
77d6f5084a
Issue #213 allow initialization fail fast even when minimumIdle is 0.
10 years ago
Brett Wooldridge
3fc263b5e2
Fix a bug that was introduced in commit fb18eff
that would prevent force-close warnings from being logged for connections already flagged for eviction. These warnings should still occur regardless of destined eviction.
10 years ago
Brett Wooldridge
cdc171f18a
JavaDoc fixes
10 years ago
Brett Wooldridge
c9f6d90ab2
Javadoc fixes
10 years ago
Brett Wooldridge
1067111883
JavaDoc fixes
10 years ago
Brett Wooldridge
bc42fe797a
JavaDoc fixes
10 years ago
Brett Wooldridge
69612f0076
Issue#201 @cowwoc merged toString() changes (largely intact)
10 years ago
Brett Wooldridge
fb18eff0c8
Eliminate the isForceClose member, and set bagEntry.evicted instead. We still use
...
a local isForceClose to avoid a race (where we might fail to log a broken connection).
10 years ago
Brett Wooldridge
7d1f0c72b5
Mainly doc fixup and method reordering.
10 years ago
Brett Wooldridge
590dbf1870
Add some comments. Add evicted check back to housekeeper to cover a rare race condition
...
where the connection is being released at the same time the maxLifetime eviction shedule is
running. That could have allowed the bag entry to be marked evicted, but have the check
in releaseConnection() just missing it, which would result in a maxLifetime connection sitting
in the pool for an indefinite amount of time.
10 years ago
Brett Wooldridge
19049c54ad
Fix #194 no need to initialize the CodaHaleShim in the JNDI factory
10 years ago
Brett Wooldridge
6772e5f4ca
Don't throw sun internal NotImplementedException, just throw a RunTimeException
10 years ago
Brett Wooldridge
fafa5050ad
Remove maxLifeTime check from getConnection() and use housekeeping scheduler instead.
10 years ago
Brett Wooldridge
44ecfd7f01
Fix #208 little bit cleaner impl of unwrap() and isWrapper()
10 years ago
Brett Wooldridge
a4c6c03ded
ConcurrentBag to common code refactor (share code between Java 6/7 and Java 8)
10 years ago
Brett Wooldridge
50a4de5fa4
Fix #208 all unwrap when the specified "iface" is actually a HikariDataSource
10 years ago
Brett Wooldridge
7e170daf15
Remove IDE warnings
10 years ago
Brett Wooldridge
f7415c7284
Fix #207 remove unneeded test utility class
10 years ago
Brett Wooldridge
62d3f4e9d9
Fix #207 opps, missed a crucial part of the fix...
10 years ago
Brett Wooldridge
d47d5a7b0e
Fix #207 Make PoolUtilities stateful, because using statics causes issues when two pools with different drivers and different capabilities exist in the same JVM. Pull out non-pooly things into a separate utility class.
10 years ago
Brett Wooldridge
7e7d124a93
Bump revision number due to large internal refactor.
10 years ago
Brett Wooldridge
f0b735cb02
Issue #206 Use a discard policy rather than an abort policy for the housekeeping thread, the abort policy causes unnecessary looping in addConnection() during shutdown() due to the housekeeping thread being used as the executor for the setNetworkTImeout() call. We could create another executor just for that, but it doesn't really make sense or matter.
10 years ago
Brett Wooldridge
5a90be9199
Make non-overridden methods final. Gets back to pre-refactor performance.
10 years ago
Brett Wooldridge
a6152f58a9
Merge more common code. Benchmarks are showing no negative impact so far.
10 years ago
Brett Wooldridge
688d1911e2
Merge more common code. HikariConfig is not a critical class, but we need to be careful about what we merge due to performance implications of inheritance and virtual dispatch that cannot be optimized by the JIT.
10 years ago
Brett Wooldridge
9d486abbfa
Massive structure refactor. Make IDE setup hell, but greatly improves maintainability.
10 years ago
Brett Wooldridge
82f98fc57e
Project restructuring experiment
10 years ago