Commit Graph

837 Commits (aaea7a5d3bd10e5041d4161fe089bb841cc07af5)

Author SHA1 Message Date
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
Brett Wooldridge 4fbc2aa94b Minor formatting change. 10 years ago
Brett Wooldridge 442bbc6362 Merge branch 'dev' of https://github.com/nitincchauhan/HikariCP into dev 10 years ago
Nitin 78034f7e45 changes as suggested 10 years ago
Nitin ae4dbf916d removed PoolBagEntry.aborted ...always had same 'value' as evicted
renamed PoolBagEntry.evicted to PoolBagEntry.evict
10 years ago
Nitin 19896c0619 if connection is marked for eviction, bypass reset state etc and close
it.
10 years ago
Hugh Lee ad9f5e6a19 fixed comment
ClassLoader.getResourceAsStream() and Class.getResourceAsStream() are
different. Refer to http://stackoverflow.com/a/1464366/524588
10 years ago
Brett Wooldridge fb50c8108c Merge pull request #384 from yaojuncn/dev
revise connection pool cleanup logic by reducing unncessary loop,
10 years ago
yaojuncn 7ad2e94ed4 revise housekeeper log 10 years ago
Brett Wooldridge 01a9a09778 Revert fix #340 see discussion in issue tracker 10 years ago
yaojuncn 93bbb25d15 change removable check 10 years ago
yaojuncn 6cc3b278b4 fix the removable check; revise space style 10 years ago
Brett Wooldridge 9613b63a43 Fixed #380 housekeeper was not being scheduled in the case of a user specified ScheduledExecutorService. 10 years ago
yaojuncn cbb1e1cc93 revise connection pool cleanup logic by reducing unncessary loop,
some details from
https://github.com/brettwooldridge/HikariCP/issues/379
based on original pull request
https://github.com/brettwooldridge/HikariCP/pull/383
10 years ago
Nitin 2a90f26145 log /creation cleanup 10 years ago
Nitin c4b0ac352c housekeeper should close evicted connections... but forget it :) 10 years ago
Nitin 7685f10303 check for evicted should not depend on removable 10 years ago
Nitin 5004e1f463 setting evicted was 'little' more aggressive 10 years ago
Nitin 6a2bfb758c for closing connection, reserve entry only when it is past idle time or
evicted, not otherwise
10 years ago
Nitin ebe5868fd1 changes as suggested
align log stats
10 years ago
Nitin d04f4dd3f1 log actual error message instead of 'Exception during pool'
name 'PoolInitializationException' is descriptive enough
10 years ago
Nitin cefc2af679 level up 10 years ago
Nitin 616a8321ab break loop 10 years ago
Nitin 6cee92a300 removed closing evicted connections from housekeeper 10 years ago
Nitin 9489dda6c0 reverted as per discussion 10 years ago
Nitin 8cc1214007 close connections marked for eviction first 10 years ago
Nitin a286c264cc change as suggested 10 years ago
Nitin 1137ed1e40 implemented suggestion from 379 10 years ago
Nitin 265ee41e70 tweak isConnectionAlive and few other 10 years ago
Nitin e789d03571 Fix Issue 375 ..restore thing that was not broken
Fixed Readme ...added missing changes from master
10 years ago
Nitin 7efb9c0c57 keeping change in state/value of member internal 10 years ago
Nitin 05a4193b38 reverted connectionproxy 10 years ago
Nitin 34fa30254f removed wrong use of clocksource 10 years ago
Nitin 5d1a63e78b better add, undone close 10 years ago
Nitin fa0b6644b2 keeping test and assignment close in con.close() 10 years ago
Nitin 31ddd3d9db smart idleTimeout 10 years ago
Nitin a0ebf35d91 Merge remote-tracking branch 'brettwooldridge/HikariCP/dev' into dev 10 years ago
Nitin c1ee0b0ce8 fix argument to log 10 years ago
Brett Wooldridge 53e7427e63 Eliminates questions from developers running tests in the IDE... 10 years ago
Brett Wooldridge 2cf1446fdd Merge pull request #347 from nitincchauhan/dev
HikariPool: Log consitency
10 years ago
Brett Wooldridge a31c2df6b7 Fixed #361 Merge branch '2.3.x' into dev 10 years ago
Brett Wooldridge 82536c0fe6 Make ResultSet.getStatement() return the StatementProxy instead of the delegate. 10 years ago
Brett Wooldridge a4d1156d08 Fixed #359 allow altering the username/password through JMX at runtime. See javadoc for HikariConfigMXBean. 10 years ago
Brett Wooldridge 9e4466776d Minor cleanup. 10 years ago
Brett Wooldridge 62ec9cd5f2 Javadoc fixes. 10 years ago
Brett Wooldridge b0b53dc607 Minor logging tweaks. 10 years ago
Brett Wooldridge 428e2b56c8 Fix #354 always set previous timestamp 10 years ago
Nitin 9136e8e6dd removed else 10 years ago
Nitin 31113bf0d9 try 2 fixed test 10 years ago
Nitin 0dbdc47f05 fixed test 10 years ago
Nitin 8eb6b76534 done now.
please see changes together here:
https://github.com/brettwooldridge/HikariCP/pull/347/files
10 years ago
Nitin f6e9793034 2nd try. not sure why the whole file shown in diff before 10 years ago
Nitin acb7d41961 done
However, Doc for setTransactionIsolation() says:
(Note that Connection.TRANSACTION_NONE cannot be used because it
specifies that transactions are not supported.)
10 years ago
Nitin dc5b484f52 better fix 10 years ago
Nitin 07ca37e7a4 minor save 10 years ago
Nitin 285bcfc415 suggestion to fix issue 349 10 years ago
Nitin c406837755 few more 10 years ago
Nitin ee043a3031 better 10 years ago
Nitin e313835b94 changes as suggested 10 years ago
Brett Wooldridge 384667e2a0 Add more information to logging of broken connections discovered in the proxy path. 10 years ago
Nitin 7bb009be24 2nd try 10 years ago
Nitin 8fd73d2501 HikariPool: Log consitency
PoolElf: I think two more round trips to db/driver is overkill (for pool
to support bad driver) especially jdbc spec reads 'closing statement
must close any current result set'. It is already slow (compare to
others) having network timeout as well as query timeout to validate
connection!
10 years ago
Brett Wooldridge 234d213cef Minor cleanup. 10 years ago
Brett Wooldridge 21ce05a962 Efficient debug logging for state resets. 10 years ago
Brett Wooldridge 256fe1d4bd Logging consistency 10 years ago
Brett Wooldridge 9c7581d48d Fix #346 handle closing (possible) ResultSet in a better way. 10 years ago
Brett Wooldridge 18320f2e4c Further normalise logging. 10 years ago
Brett Wooldridge b857c83bd1 Further normalise logging. 10 years ago
Ruben Dijkstra 2498612194 Fix resolving property files 10 years ago
Brett Wooldridge 65adba0541 Fix bug where at pool shutdown we erroneously shutdown a shared ScheduledExecutorService 10 years ago
Brett Wooldridge f063801c48 Minor logging cleanup. 10 years ago
Brett Wooldridge 251d01f70a Somewhere along the line clear got dropped. Reinstate it. 10 years ago
Brett Wooldridge 120744049f Logging format changes. 10 years ago
Brett Wooldridge c87c002ceb Performance tweak 10 years ago
Brett Wooldridge 73cf8d0b13 Cleanup 10 years ago
Brett Wooldridge 4f5abd1318 Remove runtime dependencies on Codahale and generally make things a bit cleaner. 10 years ago
Brett Wooldridge 18b9f8c1b6 Formatting 10 years ago
Brett Wooldridge 4eb7874690 Merge pull request #331 from arthurdandrea/dev
Allow the use of a user provided MetricsTracker
10 years ago
Brett Wooldridge b18c786e1d Minor bugfixes. 10 years ago
Arthur D'Andréa Alemar 2a2561e52f Implement injection of MetricsTracker using a MetricsTrackerFactory
Allows the use of user provided MetricsTracker that can collect metrics
using a library different from Dropwizard Metrics.
10 years ago
Brett Wooldridge 7dfcb265e4 Minor bugfix 10 years ago
Brett Wooldridge fab78c4449 Make poolName a member just for the sake of readability. 10 years ago
Brett Wooldridge 163e6172fc Fix issues with leakDetectionThreshold changes through the HikariConfigMXBean. Thx, Nitin. 10 years ago
Brett Wooldridge 287f4d748d Adhere to same MBean naming convention as the HikariPoolMXBean ... out of convention. 10 years ago
Brett Wooldridge bc3424575c Fix #334 caused by moving the ``HikariPoolMBean`` into the ``com.zaxxer.hikari`` package. Classes with the ``xxxMBean`` naming convention must reside in the same package. Renaming the class to ``xxxMXBean`` allows it to reside anywhere. 10 years ago
Brett Wooldridge cf2a9d3aef Fix overwrite of networkTimeout (harmless, but inefficient). 10 years ago
Brett Wooldridge 1eae36cf1d Merge fix from 2.3.9 10 years ago
Brett Wooldridge 2ac1c8b0e7 Revert/cleanup network timeout executor creation/shutdown. 10 years ago
Brett Wooldridge 68a09a882e Update leak detection threshold if it is changed by MBean at runtime. 10 years ago
Brett Wooldridge 2b674b40ce Handle null netTimeoutExecutor. 10 years ago
Brett Wooldridge 086ee72652 Minor bugfixes. 10 years ago
Brett Wooldridge cda1d6e7c6 Minor cleanup 10 years ago
Brett Wooldridge 5062bd142b Significant state ownership refactor following class relationship analysis. Probably a bit more to be done here, but better than it was. 10 years ago
Brett Wooldridge bd0d3aa01e Minor cleanup 10 years ago
Brett Wooldridge 83289b1e45 Following up on the idea that the "public interface" to HikariCP should be though of as residing in the base of the package. 10 years ago
Brett Wooldridge 66f14b08ec Minor cleanup 10 years ago
Brett Wooldridge 1571049ec0 Move interfaces. 10 years ago
Brett Wooldridge cd8c4d578a Move CloseSource implementations into interface, co-resident with factory. 10 years ago
Brett Wooldridge b249a03a6f Rename PoolUtilities to PoolElf ... following our *Elf naming convention (eg. UtilityElf) 10 years ago
Brett Wooldridge 052a86a76e Rename PropertyBeanSetter to PropertyElf 10 years ago
Brett Wooldridge 1e4f078d5d Remove code meant to handle what is not believed to be a non-existent race condition. 10 years ago