Releases: ClickHouse/clickhouse-java
Releases · ClickHouse/clickhouse-java
Release v0.6.5
Deprecations
- Following components will be deprecated and removed in 0.7.0 release:
- clickhouse-cli-client
- clickhouse-grpc-client
- Projects cli-client and grpc-client are excluded from release and build.
- No more builds for non-lts Java versions - no more Java 9 release builds.
Performance Improvements
- [client-v2]
queryAll()
optimized to use less memory (#1779) - [client-v2]
Client.Builder#setClientNetworkBufferSize
introduced to allow increasing a buffer that is used
to transfer data from socket buffer to application memory. When set to >= of send/receive socket buffer size it
significantly reduces number of system calls and improves performance. (#1784)
New Features
- [client-v2] Client will retry on
NoHttpResponseException
when using Apache HTTP client.
It is useful when close/stale connection is leased from connection pool. No client will
retry one more time instead of failing.Client.Builder#retryOnFailures
andClient.Builder#setMaxRetries
were
introduced to configure client behavior. (#1768)
Bug Fixes
- [client-v2] Correct timezone used when reading DateTime values. Affects how date/datetime values
are read whensession_timezone
is used (#1780) - [client-v2] Fix reading big integers. Previously was causing incorrect values
(#1786)
(#1776) - [client-v2] Fix server compressions when using a client instance concurrently
(#1791) - [client-v2] Fix reading arrays as list. Also affected reading nested arrays (#1800)
- [client-v1] Fix handling summary metadata for write operations. Previously was causing empty metadata
Release v0.6.4
Deprecations
- Following components will be deprecated and archived in next release:
- clickhouse-cli-client
- clickhouse-grpc-client
- No more builds for non-lts Java versions - no more Java 9 release builds.
- Lowest supported Java version will be 11.
- Java 11 support will be ended before the end of 2023.
- It is recommended to use Java 21.
Important Changes
- [Client-V1] Fix for handling DateTime without timezone when
session_timezone
is set. Now server timezone
is parsed from server response when present (#1464)
New Features
- [Client-V1/Apache HTTP] More configuration parameters for connection management. Useful for tuning performance.
(#1771)- com.clickhouse.client.config.ClickHouseClientOption#CONNECTION_TTL - to configure connection time-to-live
- com.clickhouse.client.http.config.ClickHouseHttpOption#KEEP_ALIVE_TIMEOUT - to configure keep-alive timeout
- com.clickhouse.client.http.config.ClickHouseHttpOption#CONNECTION_REUSE_STRATEGY - defines how connection pool behaves.
IfFIFO
is selected then connections are reused in the order they were created. It results in even distribution of connections.
IfLIFO
is selected then connections are reused as soon they are returned to the pool.
Note: only forAPACHE_HTTP_CLIENT
connection provider. - Additionally switched to using LAX connection pool for Apache Connection Manager to improve performance
for concurrent requests.
- [Client-V2] Connection pool configuration #1766
- com.clickhouse.client.api.Client.Builder.setConnectionRequestTimeout - to configure connection request timeout.
Important when there are no connections available in the pool to fail fast. - com.clickhouse.client.api.Client.Builder.setMaxConnections - configures how soft limit of connections per host.
Note: Total number of connections is unlimited because in most cases there is one host. - com.clickhouse.client.api.Client.Builder.setConnectionTTL - to limit connection live ignoring keep-alive from server.
- com.clickhouse.client.api.Client.Builder.setConnectionReuseStrategy - to configure how connections are used.
Select FIFO to reuse connections evenly or LIFO (default) to reuse the most recently active connections.
- com.clickhouse.client.api.Client.Builder.setConnectionRequestTimeout - to configure connection request timeout.
- [Client-V2] All operations are now executed in calling thread to avoid extra threads creation.
Async operations can be enabled bycom.clickhouse.client.api.Client.Builder.useAsyncRequests
(#1767) - [Client-V2] Content and HTTP native compression is supported now Currently only LZ4 is available. (#1761)
- [Client-V2] HTTPS support added. Required to communicate with ClickHouse Cloud Services.
Client certificates are supported, too. (#1753) - [Client-V2] Added support for HTTP proxy (#1748)
Documentation
- [Client-V2] Spring Demo Service as usage example (#1765)
- [Client-V2] Examples for using text based formats (#1752)
Bug Fixes
Release v0.6.3
Important Changes
- [Client-V1] Changed how
User-Agent
string is generated. NowClickHouse-JavaClient
portion is appended in all cases.
It is still possible to set custom product name that will be the first part inUser-Agent
value.
(#1698)
New Features
- [Client-V1/Apache HTTP] Retry on NoHttpResponseException in Apache HTTP client.
Should be used with causes because it is not always possible to resend request body.
Behaviour is controlled bycom.clickhouse.client.http.config.ClickHouseHttpOption#AHC_RETRY_ON_FAILURE
.
Works only for Apache HTTP client because based on its specific behavior(#1721) - [Client-V1/Apache HTTP] Connection validation before sending request.
Behaviour is controlled bycom.clickhouse.client.http.config.ClickHouseHttpOption#AHC_VALIDATE_AFTER_INACTIVITY
.
By default, connection is validated after being in the pool for 5 seconds. (#1722)
Bug Fixes
- [Client-V2] Fix making it possible to pass URL starting with "https://" for secure endpoints (#1718)
- [Client-V2] Fix minimizes number of threads used by the client. It reduces resource usage significantly. (#1691)
- [Client-V1] Fix slowness ( > 1 min) caused by incorrect localhost IP determination while initialization of the client (#1729)
- [Client-V2] Make client instance closeable to free underlying resource (#1733)
Release v0.6.2
New Features
- Describe non-executed SELECT queries in prepared statements to provide metadata (#1430)
- Command execution in the client API (#1693)
- Added
com.clickhouse.client.ClickHouseResponseSummary#getQueryId()
(#1636) - Added support for SSL for the Client V2
- Added proxy support for Client V2 (#1694)
- Added more examples for
Release v0.6.1
New Features
- Alpha version of the new client API. See example https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client-v2.
Bug Fixes
- Fix proper handling of ClickHouseResult to release DB connection (#1538
- Not it is possible to get raw input stream from a server response to read data in any format by user.
- Exception context remove from a message. Server information not present anymore but available thru
com.clickhouse.client.ClickHouseException#getServer
(#1677)
Release v0.6.0-patch5
Bug Fixes
- Roles (memorized by client) can be reset with 'SET ROLE NONE' query (#1647)
- MaxBufferSize can be greater than internal MAX value now
- Updated example project to use the latest version of the client
Release v0.6.0-patch4
New Features
- Added possibility to set client ID in
Referer
HTTP Header (#1572) - [HTTP] Persistence of a role after it is set by
SET ROLE <role>
Bug Fixes
- Change RowBinaryWithDefaults settings. Output is changed from true to false
- Fix fail over for Apache HTTP client. Connect timeout error is not detected correctly
- Fix password logging in DEBUG (#1571)
- Fix handling "NoHttpResponseException" in Apache HTTP client
- Fix param error in ByteUtils#equals in java9
Release v0.6.0-patch3
Bug Fixes
- Not detecting correctly ClickHouse error code
- Fix JDBC read error - Multidimensional empty errors raise a java.lang.ArrayStoreException
Release v0.6.0-patch2
Reason:
Vulnerability in dependencies
Dependencies update:
org.apache.commons:commons-compress
from1.23.0
to1.26.1
org.postgresql:postgresql
from42.6.0
to42.6.1
Release v0.6.0-patch1
Bug Fixes
- Fix decompress bug in NonBlockingPipedOutputStream (#1542)
- Fix decompress bug in NonBlockingPipedOutputStream & extra logging
- Use StringUtils to make large content
- Move test to http client test