Nitin
95b237a07f
more debug
9 years ago
Nitin
625b9d77dd
added poolname to debug
9 years ago
Nitin
fc09055538
minor cleanup
9 years ago
Nitin
8277a55c58
fixed test
9 years ago
Nitin
5ff7a72127
fixed tests
9 years ago
Nitin
cb16120753
fixed test failures
9 years ago
Nitin
b60f166681
minor cleanup
9 years ago
Nitin
8908411e41
for initializationFailFast, fail asap, not wait till connectionTimeout
9 years ago
Nitin
5a2d40879e
keep lastConnectionFailure till getAndSet
9 years ago
Nitin
4b2e1d9ea5
removed explicit use of iterator
9 years ago
Nitin
54cd9d9685
sleep intelligence :)
9 years ago
Nitin
ccfb1dbe8b
warn and reset too
9 years ago
Nitin
c731ff88b5
log property value as is. 'null' too
9 years ago
Nitin
a9f7e65b0a
sleep min 250 ms - max 7 sec
9 years ago
Nitin
bc450c6c25
warn for timeouts in config
9 years ago
Nitin
a265641ea7
warn for wrong timeouts in config:
...
http://stackoverflow.com/questions/33887002
9 years ago
Nitin
6eb0d93985
sleep for 200ms for minimum 1s, 6s for default 30s connectionTimeout.
9 years ago
Nitin
8eaaa7fdcd
sleep reasonably, fix possible negative lifetime
9 years ago
Nitin
cfd5e4d054
removed log
9 years ago
Nitin
541322a579
added warning too
9 years ago
Nitin
74c6f6e2b5
fix test
9 years ago
Nitin
7cbdb602a2
check and throw exceptions as before
9 years ago
Nitin
2980c99bd6
fix tests
9 years ago
Nitin
7027f23ead
clear/simplified validation in sync with initializeDataSource() and
...
DriverDataSource()
9 years ago
Nitin
fdce10f7db
better method name
9 years ago
Nitin
1ab30a85a4
debug ShutdownTest
9 years ago
Nitin
9ae1a01aa5
set empty property as null in config
9 years ago
Nitin
4cef6b8585
check empty after trim
9 years ago
Nitin
2320bef366
treat empty property as null
9 years ago
Nitin
1056a339a2
switched order of abort and eviction in loop
9 years ago
Nitin
4847a653f2
do not add cons if pool is not normal, avoid exceptions in shutdown
9 years ago
Nitin
ce1545bb39
format
9 years ago
Nitin
53ce83380f
better loop and var name
9 years ago
Nitin
2fc728db17
exit loop after reaching max iteration.
...
avoids creating queue of sleeping callables in case of network outage
finetuning
fine tune
better name and fix
avoid creating queue of sleeping callables in case of db or network
outage
restrict add requests to maximum pool size
separated totalConnections and poolSize
checking poolSize inside loop
decrement not required
restrict add requests to maximum pool size
changed order of increment (as it was in createPoolEntry)
9 years ago
Brett Wooldridge
317a0c1534
Merge branch 'dev' of github.com-brettwooldridge:brettwooldridge/HikariCP
10 years ago
Nitin
7151cbebf1
elseif
10 years ago
Muruganantham Mani
6ee7562b0b
2.5% random variance of the maxlifetime or 10seconds whichever is greater with random interval change
10 years ago
Nitin
51a43780bd
if idleTimeout > maxLifetime, no need to set maxLifetime too
10 years ago
Nitin
bc619c3032
Issue#483
10 years ago
Nitin
bcd5c230e2
if minimumIdle > maxPoolSize, no need to set maxPoolSize too
10 years ago
Muruganantham Mani
912c9870d8
2.5% random variance of the maxlifetime or 10seconds whichever is greater
10 years ago
Muruganantham K Mani
a2271969d6
Division by 20 is equal to 5% of the maxLifetime
10 years ago
Muruganantham Mani
0b99b0655c
Adding random 10 second for every hour in the maxlifetime. This would help manage the closing of connection in a span of seconds instead of all at once. issue #256
10 years ago
Brett Wooldridge
6320faf414
Fix test logging output.
10 years ago
Brett Wooldridge
37b96f1ed9
Fixes #465 fix apparent leak of one connection leak at startup when minimumIdle=0 ... the connection is not leaked, but the ProxyLeakTask was not cancelled.
10 years ago
Nitin
01d30f36ed
unit test fails for static
10 years ago
Nitin
e4510974a8
cleanup
10 years ago
Nitin
792374ecba
commit initSql if isIsolateInternalQueries is also true
10 years ago
Nitin
81a784fb68
static import
10 years ago
Nitin
5ac346be79
removed check (claimed != null) from hotpath
10 years ago
Brett Wooldridge
aa06e6d26d
Disabling still broken test. Maybe a rewrite is called for.
10 years ago
Brett Wooldridge
5b0336255d
Disabling still broken test. Maybe a rewrite is called for.
10 years ago
Brett Wooldridge
4d54c8f1d5
Update change log. Try re-enabling TestConnectionCloseBlocking test.
10 years ago
Brett Wooldridge
f9d4f0dc3c
Merge pull request #454 from nitincchauhan/dev
...
calling closedconnection.close() should not throw exception.
10 years ago
Nitin
0291741501
indentation
10 years ago
Nitin
12dbecd859
close should throw exception
10 years ago
Brett Wooldridge
d61b9c524d
Disable until it can be reproduced locally.
10 years ago
Brett Wooldridge
e511d930fc
Very strange that I cannot get this test to fail locally ... likely a speed difference with travis-ci.
10 years ago
Brett Wooldridge
fa2c4aff3c
Don't reassign delegate until after eviction.
10 years ago
Brett Wooldridge
686926241f
Fix broken test.
10 years ago
Brett Wooldridge
33138b18f7
Fixes #452 fixed race condition in the add-connection path.
10 years ago
Brett Wooldridge
eee453a873
Merge branch 'dev' into experimental
10 years ago
Nitin
11808e521c
unused import
10 years ago
Nitin
17b7f00eb1
removed redundant call
10 years ago
Nitin
4186e325b7
do not reset catalog to null
10 years ago
Nitin
4f467b3d37
calling closedconnection.close() should not throw exception.
10 years ago
Brett Wooldridge
514d062853
Merge pull request #453 from nitincchauhan/dev
...
remove method calls from hot path and sleep in smaller steps
10 years ago
Brett Wooldridge
ce71aa8dc7
Unit test for issue #451
10 years ago
Nitin
3218166f7d
remove method calls from hot path and sleep in smaller steps
10 years ago
Nitin
8c509f3837
calling methods back and forth is past for good :)
10 years ago
Nitin
216b3c0ac4
setting only readonly and autocommit
10 years ago
Nitin
bcde774078
check readonly on rollback
10 years ago
Nitin
10b0547ab7
comment corrected
10 years ago
Nitin
63c0fcb893
removed unused method
10 years ago
Nitin
87fa34af15
init 'other' vars too for proxy connection
10 years ago
Nitin
3bf2525262
Merge remote-tracking branch 'brett/dev' into dev
10 years ago
Brett Wooldridge
e74639c418
Fix bug uncovered during live DB testing. If the database is autoCommit=true we were trying to rollback because ProxyConnection.isAutoCommit was never initialized to true.
10 years ago
Nitin
dcd8fdb3a9
final
10 years ago
Nitin
0218ed14b5
format
10 years ago
Nitin
1daf44b754
using Throwable, better for backport too
10 years ago
Florian Rampp
678b2ce139
use multi-catch statement
...
I was not aware that this feature is available in JDK7 already and the README specifies that JDK7 is required only.
10 years ago
Florian Rampp
8a7901f292
do not fail if setLoginTimeout on delegate data source is not supported
...
Some `DataSource` implementations (like [`BasicDataSource`](https://commons.apache.org/proper/commons-dbcp/api-1.4/org/apache/commons/dbcp/BasicDataSource.html ) or [`DriverManagerDataSource`](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/datasource/DriverManagerDataSource.html ) do not support setting a login timeout. `UnsupportedOperationException` is thrown in these cases.
When a delegate `dataSource` is set for the HikariCP, it tries to invoke this method on the delegate. Only log a warning in this case instead of failing to initialize the HikariCP in this case.
This is amongst others relevant for using HikariCP in Grails, which creates instances of `org.springframework.jdbc.datasource.DriverManagerDataSource` (at least in version 2.2.4).
10 years ago
Brett Wooldridge
c0c6daf93d
Fixed #401 log warning when both dataSourceClassName and jdbcUrl are specified.
10 years ago
Brett Wooldridge
23c1b80bfd
Tighten bypass window. May tighten further to 250ms later.
10 years ago
Brett Wooldridge
efa9726835
Adjust test timeout to try to address travis-ci transient failures.
10 years ago
Brett Wooldridge
ea680f7ff5
Merge commit '49be257130ba7bc3080f5bc8a0f191db86f23394' into dev
...
* commit '49be257130ba7bc3080f5bc8a0f191db86f23394':
commented log & added changes removed from old commit
align log with 'Before cleanup'
10 years ago
Nitin
49be257130
commented log & added changes removed from old commit
10 years ago
Brett Wooldridge
716dd345cd
Fixed issue with proxy generation
10 years ago
Nitin
0da14c8ce9
align log with 'Before cleanup'
10 years ago
Brett Wooldridge
19e0c5d575
Merge pull request #440 from nitincchauhan/dev
...
removed old call to close statements
10 years ago
Nitin
1c2f1c13a5
loop is required
10 years ago
Nitin
c3482cde10
removed redundant loop, addItem() is actually adding itemS
10 years ago
Nitin
f9d493a7d8
checking evict only when required
10 years ago
Nitin
285157c335
removed old call
10 years ago
Brett Wooldridge
5553fe5dcf
Merge pull request #438 from nitincchauhan/dev
...
removed isClosed() check.
10 years ago
Nitin
c37a6cb20a
removed isClosed(), why trip to check when close() is no-op if already
...
closed, moreover isClosed() was not guarded by network timeout. mostly
call to close would be once anyway.
10 years ago
Brett Wooldridge
03aad4ea35
minor cleanup
10 years ago
Nitin
6137805ab3
minor cleanup
10 years ago
Brett Wooldridge
4ae5c69eae
Shorten some tests timeouts to speed-up build.
10 years ago
Brett Wooldridge
410f240c0a
Merge branch 'dev' of https://github.com/brettwooldridge/HikariCP into dev
10 years ago
Brett Wooldridge
31447dd1e2
Evict connection immediately upon broken state detection.
10 years ago
Brett Wooldridge
79386c6487
Fixes #432 improve accuracy of elapsed time calculation to account for time spent in isConnectionAlive() call.
10 years ago
Brett Wooldridge
b2cfd09998
Fix timing sensitive test that often fails on travis-ci
10 years ago
Brett Wooldridge
c399b46551
Merge branch 'dev' of github.com-brettwooldridge:brettwooldridge/HikariCP into experimental
10 years ago
Brett Wooldridge
e125d509fe
Cleanup. Former code would remove N elements if PoolEntries were unreservable. Additionally, I'd like to see stats every 30 seconds, as long as idleTimeout is enabled, regardless of idle removable (because connection attrition occurs by other means as well.
10 years ago
Nitin
a2593599d6
sort before closing idle connections
10 years ago
Nitin
298bf85c36
renamed method/var names, moved toString() to PoolBase, checking for
...
'readonly' before commit/rollback.
10 years ago
Brett Wooldridge
295ff59ab7
Fixes #425 a low impact change to satisfy an edge-case.
...
Still, relying on object identities from getResultSet() is an extremely bad idea, regardless of how some drivers seem to implement it. Relying on that implementation artifact is contrary to the Statement interface documentation, and likely to fail in a variety of environments. HikariCP itself does not and will not guarantee the future behaviour of this method.
10 years ago
Brett Wooldridge
3bb13c03db
More refactors to isolate metrics from internal pool classes
10 years ago
Brett Wooldridge
eaa5ca879e
More metrics refactor. Isolate poolEntry from metrics package, reinstate no-op class to allow JIT to DCE the code.
10 years ago
Brett Wooldridge
e50be62d4f
More metrics refactor. Isolate poolEntry from metrics package, reinstate no-op class to allow JIT to DCE the code.
10 years ago
Nitin
cc3f8614af
more cleanup
10 years ago
Nitin
ff8e54c56f
correct time
10 years ago
Nitin
eaaf64f93f
renamed and removed volatile from lastBorrowed and cleanup
10 years ago
Nitin
e3167d40a6
protect pool entry
10 years ago
Brett Wooldridge
ca0464d659
Tweaks to investigate Windows infinite loop and/or spurious wakeup.
10 years ago
Nitin
0069a4eff8
duplicate2
10 years ago
Nitin
d0f84e101d
cleanup
10 years ago
Nitin
fc32b4de73
removed redundant creationTime. lastAceess is initialized at creation as
...
well.
10 years ago
Nitin
9226660ce7
clear param
10 years ago
Brett Wooldridge
02122fc5e8
Minor cleanup.
10 years ago
Brett Wooldridge
aca80d3ed9
Full refactor.
10 years ago
Brett Wooldridge
0e6a595612
Move stuff around
10 years ago
Nitin
53287cd101
changes as suggested
10 years ago
Nitin
1e55190ed4
Merge remote-tracking branch 'brett/dev' into dev
10 years ago
Brett Wooldridge
dbeb5ab1cb
Remove Method.getParameterCount() because it is only available in Java 8. Use getParameterTypes().length instead.
10 years ago
Brett Wooldridge
1e8ea2b3e2
Remove Method.getParameterCount() because it is only available in Java 8. Use getParameterTypes().length instead.
10 years ago
Brett Wooldridge
0698d8f761
Correct unit test.
10 years ago
Nitin
e2763a48f6
renamed poolEntry.returnPoolEntry() to poolEntry.close()
10 years ago
Nitin
1b5ecf8b2a
Mediator: simplified check of validation modes
...
ConnectionProxy: made memebers private, added missing methods of
connectionState. not sure why ide does not complain !
10 years ago
Brett Wooldridge
b145a385c6
#415 removed unused API
10 years ago
Brett Wooldridge
afe1527039
Use laxySet() when returning pool entries.
10 years ago
Brett Wooldridge
4639ca0bfb
Fixes #415 missed commit. Don't use java.beans
10 years ago
Brett Wooldridge
e0039464eb
Null checks. Now back to work.
10 years ago
Brett Wooldridge
eb3adb7faf
Fixes #406 execute validation query during connection setup to make sure its ... um ... valid.
10 years ago
Brett Wooldridge
8df62e3bf1
Mediator refactor
10 years ago
Brett Wooldridge
caa4b0d0bc
Fixes #400 make getters public
10 years ago
Nitin
e91059f320
fix test
10 years ago
Nitin
dd6fdae57e
do not call set for TRANSACTION_NONE
10 years ago
Nitin
480fd309d2
do not call set if default is same as user specified
10 years ago
Nitin
af4f8a991c
do not set connection with property that user have not specified.
10 years ago
Brett Wooldridge
b8d2077869
Even more correct lastAccess tracking.
10 years ago
Nitin
891b5cd930
moved closeStatements()
10 years ago
Nitin
8d1ba093b1
missed one
10 years ago
Nitin
8f61b1781c
unintentional logging
10 years ago
Nitin
000654e737
remove resetPoolEntry(), calling individual method if changed
10 years ago
Nitin
d362ed52df
set lastAccess only if rolled back
...
closeStatements() already caches sqlexception
10 years ago
Brett Wooldridge
ee8025e99c
fix javadoc error
10 years ago
Brett Wooldridge
dbe9320924
Back-out deoptimization. Benchmark shows degradation, which makes sense because
...
of a new conditional in close() -- the return value of closeOpenStatements() -- which is
'true' 99.999% of the time and therefore the conditional is merely overhead.
10 years ago
Brett Wooldridge
182c8c58ab
Opps, forgot to flip the conditional.
10 years ago