forked from brettwooldridge/HikariCP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
477 lines (307 loc) · 17 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
HikariCP Changes
Changes in 2.3.6
* Allow explicit definition of driverClassName to override DriverManager.getDriver(url)
located driver.
* Fixed a rare issue where a Connection that is held out of the pool, and never used by
the holding thread, upon returning to the pool might be given to another thread without
an aliveness test.
Changes in 2.3.5
* Fixed regression caused by enhancement #279 that imposed a runtime dependency on
Dropwizard metrics.
Changes in 2.3.4
* Fixed class cast exception when setting the HealthCheckRegistry via JNDI lookup.
* Allow Dropwizard MetricRegistry/HealthCheckRegistry to be set after pool startup --
one time only.
* Make logger in BaseHikariPool non-static and use getClass() to log messages as the
implementation class rather than as BaseHikariPool.
* Removed deprecation from connectionInitSql, it will be allowed.
* Made suspect/resume lock non-static (should be be shared across pools).
* Improved unwrap() behavior in the Hibernate HikariConnectionProvider.
* Improved leak detection log
Changes in 2.3.3
* Fixed bad interaction with PostgeSQL JDBC driver whereby a SQLException thrown by
PostgreSQL where the getNextException() call returns the original exception and causes
an infinite loop in HikariCP (and eventual stack overflow).
* Throw a typed Exception rather than a simple RuntimeException when pool initialization
fails.
* Allow Dropwizard Metrics and HealthChecks to be configured by a JNDI lookup.
Changes in 2.3.2
* Add support for Dropwizard HealthChecks through the introduction of two initial health
checks: ConnectivityCheck and Connection99Percent. See the Github project wiki for
documentation.
* Allow a lower maxLifetime setting of 30 seconds (compared to previous 120 second limit)
* Improve the message displayed when a connection leak is detected.
* Fixed a bug where Connection.setNetworkTimeout() was called on an already closed connection
resulting in a warning log from the AS400 JDBC driver.
Changes in 2.3.1
* Work around a bug in the MySQL Connector/J implementation of Connection.setNetworkTimeout()
that results in non-deterministic asynchronous application of the timeout, resulting in an
NPE from the MySQL driver when setNetworkTimeout() is followed immediately by close().
* Introduced a separate validationTimeout property, distict from connectionTimeout, to allow
greater control for some deployments that desire a long (or infinite) connectionTimeout
but expect the aliveness check to succeed for fail within a different (shorter) amount of
time.
Changes in 2.3.0
* Support pool suspend/resume to support certain failover scenarios.
* Fix theoretical race in JDBC 4.0 detection support.
* Improve shutdown() semantics to avoid exceptions as connections are forcefully
aborted.
* Unregister Codahale metrics at shutdown, if metrics are enabled.
* Major internal project layout restructuring to allow shared use of common code
between the Java 6/7 and Java 8 versions.
* Fixed bug where two pools in the same VM (and ClassLoading domain), using drivers
with differing JDBC support levels, would fail unless both pools were using
connectionTestQuery.
* Improved timeliness of maxLifetime evictions, while increasing performance of
getConnection() slightly as a side-effect.
* Fixed bug in HikariDataSource unwrap() semantics.
* Allow a lower leakDetectionThreshold of 2 seconds.
* Fixed bug when using the HikariJNDIFactory that required the presence of
Codahale metrics.
* Support initializationFailFast even when minimumIdle = 0
* Log internal pool inconsistencies rather than throwing exceptions that might
disrupt internal executors.
* Guard against poor or unreliable System.nanoTime() implementations.
Changes in 2.2.5
* Fixes for Java 6 compatibility.
* Implement full transaction state tracking. This allows HikariCP to bypass
the automatic rollback when connections are returned to the pool if the
transaction state is "clean".
* Rename MBean closeIdleConnections() to softEvictConnections() and implement
"evict on return" semantics.
* Fixed bug in code that sets HikariConfig values from a Properties instance
that prevented defaults from being read properly.
* Fixed an obscure bug in connection creation with a driver that throws an
exception when setTransactionIsolation() is called with the value returned
by getTransactionIsolation(). We now bypass setTransactionIsolation() if
the user has not configured an isolation level (using the default).
* Fix a bug where DataSource.loginTimeout() was always being set to 1 second.
* Fix bug where some drivers return 0 from Connection.getNetworkTimeout(),
and yet throw SQLFeatureNotSupportedException when setNetworkTimeout() is
called. This broke they way that HikariCP had implemented JDBC 4.1 support
detection.
Changes in 2.2.4
* Generate proxy classes into the same protection domain as the HikariCP
loaded classes. This solves issues with signed jars.
* Improve accuracy of pool statistics available to JMX and logged at debug
level (at a slight performance cost).
* Fixed issue where after a database down condition, and when minimumIdle is
set to 0, when the database connectivity is restored the connections could
ramp up to the maximum pool size. Eventually, idleTimeout and maxLifetime
would restore normal pool conditions, but it was still undesirable behavior.
* Improved connection timeout handling by using Connection.setNetworkTimeout()
if available (JDBC 4.1).
* drvierClassName is no longer a required property when jdbcUrl is specified.
Omitting this property only works for compliant drivers.
* Add auto-detection of support for Statement.setQueryTimeout() used in the
alive check. Fixes failures with test queries on the PostgreSQL driver
when not using JDBC4 isValid() alive checks.
* The pool now defaults to fail-fast initialization. If you need to start
your application without/before the database, you will need to explicitly
set initializationFailFast to false.
* Dropwizard/Codahale metrics are now supported via the setMetricRegistry()
method in HikariConfig and in HikariDataSource.
* Fixed issue with pool initialization of MySQL after default value of
initializationFailFast property was changed to false.
* Further shadow runtime dependency on Codahale metrics from reflection
performed by Spring and other IoC containers.
* Fix issue where network timeout was not properly restored to its default
value after modifying it for the duration of the addConnection() method.
Changes in 2.1.0
* Significant internal refactor supporting creation of new proxy instances
(throwaway) around Connections for each call to getConnection(). This
can avoid issues where a thread continues to try to use a connection
after it is closed [returned to the pool].
* Allow HikariConfig(String propertyFileName) to load properties file from
classloader as a stream, with fall-back to the file-system.
* Allow loading of properties file specified by -Dhikaricp.configurationFile
system property when using the default HikariConfig() or HikariDataSource()
constructors.
* Fixed accounting issue with totalConnections when aborting connections
during shutdown, causing a warning message to be logged.
* Fixed regression in Java 8 codeline that would prevent minimumIdle from
being set before maxPoolSize.
* Fixed regression with Tomcat carping about ThreadLocal variables held after
web application restart
* Change to make HikariConfig.getTransactionIsolation()/setTransactionIsolation()
follow proper bean semantics.
* Fixed issue where connections created in the pool would skip the alive check
the first time they were used.
Changes in 2.0.1
* Split project into Java 6/7 and Java 8 components.
* Fixed issue in JNDI object factory which would not allow JNDI-defined
DataSource properties to pass-thru to the pool.
* Fixed issue where under certain conditions getConnection() could
timeout prematurely.
* Fixed issue where user-defined pool name would be overridden by the
automatically generated name.
* Fixed NPE when one of either username and password is defined, and the
other is null.
* Fixed issue tracking the statements when there are mixed statement
types (Statement, PreparedStatement, etc.) open on the connection and
the number of unclosed statements exceeds 32.
* Fixed issue where housekeeping threads would add idle connections
even when minimumIdle was 0.
* Fixed issue where Wrapper.isWrapperFor() and Wrapper.unwrap() calls
did not recurse as per specification.
* HikariDataSource now implements the Closable interface.
* Integrated change to allow specifying a ThreadGroup for thread
creation is certain restricted environments.
Changes in 1.4.0
*) Fix bug that did not allow minIdle property to be set.
Changes in 1.3.9
*) Added pool name to housekeeping thread name to make thread dumps
more meaningful in containers with multiple pools.
*) Improved shutdown semantics; make a concerted effort to close
idle connections and abort or close active connections.
*) Performance enhancements.
Changes in 1.3.8
*) Fixed incorrect logic when using JDBC4 isValid() test for alive
status of connection.
Changes in 1.3.7
*) Added JNDI object factory (com.zaxxer.hikari.HikariJNDIFactory)
for Tomcat and other containers that prefer JNDI-registered DataSource
factories.
*) Fix NPE that can occur when connections cannot be created and
callers to getConnection() timeout.
*) Various bug fixes and minor enhancements.
Changes in 1.3.6
*) Include connection failure cause in calls to getConnection() that
timeout (due to connection failure). Removed chatty logging.
*) Java8 Compatability fixes.
*) Include pool name in logging messages. Thanks for the contribution
@jaredstehler.
Changes in 1.3.5
*) Fixed a regression in the Javassist code generation.
*) Various bug fixes and minor enhancements.
Changes in 1.3.4
*) Added new property isolateInternalQueries used to control whether
internal pool queries such as connection alive tests are isolated
in their own transaction.
*) Added properties for DriverManager (driverClassName) and JDBC URL-based
(jdbcUrl) configuration. 1999 called and wants its JDBC driver back.
*) Added new username and password properties to allow default authentication
for connections.
*) Added support for the getConnection(username, password) method signature
to HikariDataSource.
*) Added new property readOnly to control the default read-only status
of connections in the pool.
*) Deprecated acquireIncrement property.
*) Deprecated acquireRetries property.
*) Deprecated acquireRetryDelay property.
*) Deprecated minimumPoolSize property.
*) Added new property minimumIdle used to control the minimum number of
idle connections the pool should try to maintain on a running basis.
*) Added evictConnection(Connection) method to HikariDataSource to allow
special cases where users wish to forcibly eject a connection from
the pool. To use used cautiously, read the JavaDoc before using.
*) Various bug fixes and minor enhancements.
Changes in 1.3.3
*) Removed shared state contention that was causing excessive CPU cache-line
flushing. Nearly 4x improvement in Connection acquisition/release
performance.
*) Fixed issue with Tomcat carping about ThreadLocal variables held after
web application restart.
*) Fixed issue where the maximum configured connections could be overrun
during large burst requests for connections.
Changes in 1.3.2
*) Java 6 compatibility.
*) HikariDataSource now extends HikariConfig, so pool properties can be
set directly on a HikariDataSource without need to create a HikariConfig.
The cost of doing so is a small runtime cost due to the fact that an
"is initialized" check must be performed on every invocation of
getConnection() due to lazy initialization of the pool.
*) Added Sybase-specific disconnect error codes to SQLException snooping.
*) Added HikariConfig.setCatalog() method to set DataSource catalog.
*) Add DataSource.close() method that is synonymous with shutdown().
*) More performance improvements (never ending).
*) Moved benchmarks to https://github.com/brettwooldridge/HikariCP-benchmark
Changes in 1.3.0
*) Pool is now backed by a custom lock-less ConcurrentBag that
provides superior performance to LinkedBlockingQueue and
LinkedTransferQueue for usage patterns of connection pools.
*) Fixed bugs reported against the 1.2.9 release.
*) Added more detailed logging for broken connections and failures
during new connection creation.
Changes in 1.2.9
*) Added a fail-fast option for pool initialization. If enabled, a
RuntimeException will be thrown if there are errors during pool
initialization.
*) Made the registration of the HikariCP MBeans optional. They now
default to not being registered. Registering them causes a minor
performance hit due to additional pool data collection in
HikariDataSource.getConnection().
*) Added the SQLException message to the log entry when an exception
occurs during physical connection acquisition.
*) Implemented an orderly shutdown of the pool via the shutdown() method
on HikariDataSource.
*) Listened to "Adele - Live At The Royal Albert Hall" on endless loop.
Changes in 1.2.8
*) Fixed a critical bug introduced in 1.2.7 occurring when the number of
concurrently open statements exceeds sixteen.
Changes in 1.2.7
*) Finally achieved performance parity between the generated delegates
and the former method of instrumenting driver classes directly.
*) Improved generated delegate code. Removed unnecessary casts, moved
to a static proxy factory rather than a singleton (performance win).
*) Improved performance of FastStatementList (primary source of speed-up
to reach parity with former instrumentation code).
*) Removed aliveness check on connection creation.
*) Track connection isolation level and only reset if the state has
become "dirty". Avoids unnecessary round trip to the DB during the
aliveness check.
*) Added interface IConnectionCustomizer and related HikariConfig
property 'connectionCustomizerClassName' to allow users to specify
a connection customization implementation.
Changes in 1.2.6
*) Fixed regression that caused IndexOutOfBounds when multiple unclosed
Statements existed at the time of Connection.close().
*) Fixed incorrect pom.xml dependency on Hibernate.
Changes in 1.2.5
*) Instrumentation mode (agent) removed due to narrowing gap between
delegation mode and instrumentation (and to simplify the code base).
*) Added setDataSource() to HikariConfig to allow a DataSource instance
to be explicitly wrapped by the pool. Only available when creating
HikariConfig programmatically or constructing HikariConfig from a
java.util.Properties instance.
*) Fixed Hibernate threading issue (certain usage patterns) introduced
in 1.2.2.
*) Fixed issue observed with PostgreSQL whereby the query that tests the
connection for "aliveness" also starts a transaction (when auto-commit
is false), thereby causing a later failure when we tried to set the
transaction isolation level.
*) Fixed issue where idleTimeout could not be set to 0, thereby disabling
it. Incorrect value validation caused 0 to be rejected as a valid value.
Changes in 1.2.4
*) Fix another Hibernate-related issue whereby an NPE is encountered when
a thread that was not the thread that obtained a Connection tries to
interact with that Connection.
Changes in 1.2.3
*) Fix internal (but suppressed) exception during rollback of connections
returned to the pool with auto-commit turned off.
*) Fix a reflection issue that causes Hibernate failures due to the
CallableStatement interface being incorrectly injected into statement
proxies that are PreparedStatement or Statement instances.
Changes in 1.2.2
*) Perform a rollback() on connections returned to the pool with
auto commit disabled.
*) Add a constructor for HikariConfig that accepts a Properties
object.
*) Speed improvements for delegate mode.
*) Fix a bug where connection timeouts could not be disabled.
*) Permit setting the DataSource logWriter either on the HikariDataSource
or via addDataSourceProperty() on the HikariConfig.
*) Add transactionIsolation property to allow setting the default
transaction isolation level for connections.
Changes in 1.2.1
*) Clear SQL warnings before returning a connection to the user.
*) Added asynchronous connection backfill strategy that triggers
when the pool becomes empty as a result of dispatching a
connection.
*) Changed default acquireIncrement to 1, set minimum timeout of
100ms for acquiring a connection.
Changes in 1.1.9
*) Added connectionInitSql property to allow setting connection
properties when a new connection is created.
*) Added setDataSourceProperties() setter to HikariConfig to
allow easier configuration though Spring.