Commit Graph

963 Commits (cab4ee6a241fd1b46e02318b3a2ac2ea8f7d8fcb)

Author SHA1 Message Date
Brett Wooldridge 5eebe56dd1 Fixes #591 Synchronise the track statement method, and clearing of the tracked statement list. 9 years ago
Brett Wooldridge 21357a6b08 Fixes #591 Synchronise the untrack statement method to ensure that Statements are independently thread-safe. 9 years ago
Brett Wooldridge bd96f1cca4 Fixes #593 This is a very common condition rather than an "exceptional" one, so log at information level and do not classify as a "failure". 9 years ago
Matthew Tambara d59771cd16 Add test to demonstrate concurrency problem 9 years ago
Nitin 6ed3b18591 small but important fixes
removed var

removed resetting, delink validationTimeout from connectionTimeout

one less ref per leak task. renamed start() to schedule()

made some fields final

init of leakDetectionThreshold is not required for other instances

toString using elapsedDisplayString

fix: update poolEntry.lastBorrowed in case NopMetricsTrackerDelegate

fix tests.. try1

setting isCommitStateDirty conditionally in setAutoCommit()

again, avoid calling getNextException :)

setting lastAccess in close()

setting lastAccess required only in ctor and close

removed borrowed time from PoolEntry#toString()

now that lastAccess is moved to close(), moved condition too

one less call to System.nanoTime()

fix. using toNanos()

reverted toNanos() change, got too cumbersome

removed two calls to system time

timeout is not clock time :)

only one call saved but precise 'time taken to borrow'

unlink validation of connectionTimeout with maxLifetime

Merge

Revert
9 years ago
Brett Wooldridge fc1aea9609 Merge branch 'dev' of https://github.com/nitincchauhan/HikariCP into dev 9 years ago
Nitin e4b91287cb simplified call to executeSql() 9 years ago
Nitin c7e3a8f6cc moved validateNumerics(), last in validation and is not throwing any
exception
9 years ago
Guido Medina bf83c624ed IntelliJ inspections fixes, Maven dependencies and plugins updated to latest stable. 9 years ago
Nitin 1b1b63fb3e renamed ProxyLeakTask as it has nothing to do with 'proxy' 9 years ago
Nitin a6486c6417 fix: set last access even for readonly and set isCommitStateDirty wisely 9 years ago
Nitin 4065283619 better variation 9 years ago
Nitin 9d34443031 bug fix: do not call next exception if delegate == closed 9 years ago
Nitin 1a9494596f test failure fix 3 9 years ago
Nitin 5a41fee89b test failure fix 2 9 years ago
Nitin 5238d2d4c4 fix test failure 9 years ago
Nitin bd3e570192 added, corrected validation and test 9 years ago
Nitin 3095b6dc9e avoid re-setting twice in validation 9 years ago
Nitin 7b1301eeec removed unused import 9 years ago
Nitin 47ac982cc3 create leak task first and reverted long to int change 9 years ago
Nitin 2e5dd85133 replaced volatile long with int and import static TimeUnit.* 9 years ago
Nitin 0f75311732 using UNINITIALIZED 9 years ago
Nitin 2b6da07d26 cleanup 9 years ago
Nitin 82f7c15ace changes as suggested 9 years ago
Nitin 838d929067 using 'Failed' like every where else, instead of 'Unable'. 9 years ago
Nitin 6436870bea separate validationTimeout and connectionTimeout and validation, init
networkTimeout only once.
9 years ago
Brett Wooldridge 6e06620976 I didn't like this change, but missed it in the review. Readability over performance in this case. Not to mention that the JVM is likely to hoist the instanceof check and cast out of the loop because it is final invariant. 9 years ago
Brett Wooldridge 1f244af32f Issue #547 Cleanup and additional logging. 9 years ago
Brett Wooldridge fb09f10298 Log a warning (once) when it is not possible to honor a validation timeout of less than 1 second. 9 years ago
Brett Wooldridge 0e3677afa3 Use same terminology as other validation log messages, ie. "is less than" or "is more than". 9 years ago
Brett Wooldridge 6b535d542d Merge branch 'dev' of github.com:nitincchauhan/HikariCP into dev 9 years ago
Nitin e46034f56d bugfix: calling sValid() with 0 is infinite. made minimum 1sec 9 years ago
Brett Wooldridge 62fdb2c6c3 Merge pull request #567 from nitincchauhan/dev
avoid 'more' exceptions after 'un-recoverable' exception thrown before for the connection
9 years ago
Nitin e7da3f5dc7 reverted as suggested 9 years ago
Nitin 0d0eec16ea moved check to call(), start thread in other loop 9 years ago
Nitin 14ceda3b0c for re-throwing exception, setting log level to error 9 years ago
Nitin 4c2486e4a0 removed static log, like parent PoolBase. checking instanceof out of
loop
9 years ago
Nitin a007e730be race test: exit loop on exception 9 years ago
Nitin d3bc0a155a it is 1 thread so have queue size that mostly do not require to queue
jobs on caller
9 years ago
Nitin 3610590d64 poolName was missing in few logs 9 years ago
Nitin ba09a68fe1 better thread names and log in validateNumerics() with poolName 9 years ago
Nitin f46fc1e9e5 setting allowCoreThreadTimeOut first 9 years ago
Nitin 8bece2de76 consistent name for threads 9 years ago
Nitin c2523133d4 over-riding method instead of passing true as default from other places 9 years ago
Nitin 2bc3d98901 unique 'closing' reason for each situation 9 years ago
Nitin 76d490d2de removed explicit call to fillInStackTrace() 9 years ago
Nitin ce03fc68c9 removed word 'pool' from thread name 9 years ago
Nitin e156b0d719 removed misleading 'extra' comma 9 years ago
Nitin 9936e95afe moved log 'closed' at the very end 9 years ago
Nitin f23f358ad4 avoid 'more' exceptions after connection is detected throwing
un-recoverable exception
9 years ago
Brett Wooldridge e350d1f15f Issue #566 Remove separate Counter metric for timeouts, count is implicitly captured and available from the new Meter metric for timeout rates. 9 years ago
Will Vuong 85a298ccc6 Add metric for recording count and rate of connection timeouts 9 years ago
Brett Wooldridge 65e23b102a Merge pull request #550 from ash2k/improvements2
Improvements2
9 years ago
Brett Wooldridge 4a5ffcdd05 Merge pull request #556 from Shredder121/timing-windows
Skip the `testMetricUsage` test on Windows
9 years ago
Brett Wooldridge 68a52f1431 Merge branch 'dev' of https://github.com/nitincchauhan/HikariCP into dev 9 years ago
Brett Wooldridge 6f49960d13 Spelling and naming. 9 years ago
Brett Wooldridge 852bbff2ad Minor logging changes. 9 years ago
Brett Wooldridge 91ad77b142 Don't assume 'now' is in milliseconds ... it's probably nanoseconds on most platforms. 9 years ago
Brett Wooldridge 7dfdf597e2 Because housekeeper runs immediately now, 'previous' timestamp must be initialised as if it has run before, otherwise retrograde detection triggers. 9 years ago
Brett Wooldridge e2f1974dc9 Add null check. 9 years ago
Brett Wooldridge 69dbe20cff Issue #559 Adjust illegal clock motion detection, use scheduleWithFixedDelay() for housekeeper, and enlarge closeConnectionExecutor queue. 9 years ago
Nitin b78fde9121 full stop :) 9 years ago
Nitin 96c91d549a disable leakDetectionThreshold if not valid. 9 years ago
Nitin 0e3f0eb0f6 leakDetectionThreshold should be less than maxLifetime 9 years ago
Brett Wooldridge d4d6d759de Issue #547 Decreased allowable minimum connectionTimeout and validationTimeout to 250ms. 9 years ago
Brett Wooldridge bd7e3ba6db Issue #563 Do not start the house-keeping thread until after pool initialisation has completed. 9 years ago
Nitin 2b0e3f7553 changed log level: warn instead of debug, during driver support check
(logs only once)
9 years ago
Brett Wooldridge f7c8118a86 Issue #559 cap the number of connections added by fillPool() if there are already pending tasks to do so. 9 years ago
Brett Wooldridge 91dbe31ff2 Fixes #559 improve logging of time shifts, allow retrograde time adjustments 9 years ago
Nitin 4f865cabb5 do not set maxLifetime when disabling idle timeout 9 years ago
Nitin f40a13b5be added synchronized to getObjectInstance() 9 years ago
Nitin a40e4856c9 renamed method to checkDriverSupport() and query driver default
transaction isolation once
9 years ago
Ruben Dijkstra 8adf36bc3d Skip the `testMetricUsage` test on Windows
My 75th percentile is indeed 250ms, but _sometimes_ returns 249ms
9 years ago
Brett Wooldridge c0bd8bfeac Fixes #555 check for default method is not longer needed because proxy generation is performed at build-time not run-time now. 9 years ago
Nitin 99cacb33b2 changes as suggested. reverted resetBits and method.getParameterCount() 9 years ago
Brett Wooldridge 73491abb31 Fixes #555 check for default method is not longer needed because proxy generation is performed at build-time not run-time now. 9 years ago
Nitin 573660dfe1 future safe from statement reorder 9 years ago
Nitin 64dd93fe8f minor 9 years ago
Nitin 85e41abf10 context.close is correct. 542 may have other reason/s! 9 years ago
Nitin b525e0f7ef set maxPoolSize = minIdle only if undefined, consistent error messages 9 years ago
Nitin ad754d085b made transactionIsolation final 9 years ago
Nitin fde88d0659 if user specified, set transaction isolation level 9 years ago
Nitin ce50c2cfd6 removed resetBits. setting transaction isolation level like readonly &
autocommit.
9 years ago
Nitin c8cd7ab1bb swap test condition 9 years ago
Nitin 9a63ebf876 replaced getParameterTypes().length with getParameterCount() 9 years ago
Mikhail Mazurskiy 743dc09d9a Slightly improve generics 9 years ago
Mikhail Mazurskiy a30dcd87b8 Cache volatile reads in local variables
Avoid unnecessary read memory barriers
9 years ago
Mikhail Mazurskiy c3dcb08023 Preserve tread interrupted status 9 years ago
Nitin aa90bd62e0 close statement before commit/rollback 9 years ago
Nitin 6769539f10 close ds 9 years ago
Nitin 23b4909155 sizing queue for connection closing proportionally 9 years ago
Nitin c362e8bb35 fixed test 9 years ago
Nitin 9daa51313f I've added context.close() before but not sure anymore! see 542 9 years ago
Nitin 87757fcd0a keeping connectionBag.remove and totalConnections.decrementAndGet()
close by
9 years ago
Nitin 5f851a4cfb reverted. using cachedExecutor for setting network timeout as before 9 years ago
Nitin c9ad521660 cleanup + rearrange statements 9 years ago
Nitin 2f3a1079ed merged DefaultThreadFactory with UtilityElf 9 years ago
Nitin cf1b7738c0 unused import 9 years ago
Nitin a56f5dcb2d removed ThreadPoolExecutor for use with setNetworkTimeout 9 years ago
Brett Wooldridge 1a64ab2357 This change in incorrect. Even the pure JDBC4 isValid() check can execute a query, and it is known that some drivers do so. 9 years ago
Brett Wooldridge 77e5972005 Fix for Java 7. 9 years ago
Brett Wooldridge a270577dc3 Merge branch 'dev1' of https://github.com/nitincchauhan/HikariCP into dev 9 years ago
Nitin 5c39c0a462 cache and refresh 'volatile' validationTimeout too 9 years ago
Nitin c7652d6ef9 optimize isConnectionAlive() replaced getAndSetNetworkTimeout with
setNetworkTimeout
9 years ago
Nitin 6124110d86 revert to setting network time out in try. in case it throws 9 years ago
Nitin fd02583e47 minor tweaks 9 years ago
Nitin 787bd979eb better property logging 9 years ago
Nitin 211e8e5d50 special treatment for password 9 years ago
Nitin d3d5dd6414 null check with instanceof is redundant 9 years ago
Nitin 9bb262cb23 reverted nullifying 9 years ago
Nitin 705c9e7db5 nullify in condition 9 years ago
Nitin ce4ff9255b fixed NPE in tests 9 years ago
Nitin 3d2a082da8 do NOT recycle connection that is evicted in checkException() 9 years ago
Nitin 5321da3f50 better closure reason 9 years ago
Nitin 9168b83377 false warning, removed. 9 years ago
Nitin 60e272614e re-setting isIsolateInternalQueries if not required 9 years ago
Nitin 2bd02091b4 reverted: setting lastConnectionFailure to null 9 years ago
Brett Wooldridge 48a8afd141 Fixes #495 implement iterator for Tomcat leak detection. 9 years ago
Nitin 926167598a Fixed Test 9 years ago
Nitin 1e24d50f97 make sure pool is ready before reseting counter 9 years ago
Nitin 4ec2e80c1e reset StubConnection.count after pool initialization 9 years ago
Nitin b88b314adc fixed tests :) 9 years ago
Nitin 18c0e2d6b0 assertion with text 9 years ago
Nitin af93c99019 set Sleepbackoff time to maximum 10 seconds 9 years ago
Nitin cd24a1e024 fixed errors 9 years ago
Nitin 60b58ad63d minor cleanup in tests 9 years ago
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