Skip to content

Commit

Permalink
Merge pull request #1773 from ClickHouse/pre_0.6.4
Browse files Browse the repository at this point in the history
Pre 0.6.4 Updates
  • Loading branch information
chernser authored Aug 17, 2024
2 parents 5609c18 + 047c8ac commit fc8d92e
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

env:
CHC_BRANCH: "main"
CHC_VERSION: "0.6.3"
CHC_VERSION: "0.6.4"

jobs:
nightly:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
version:
description: "Release version"
required: true
default: "0.6.3-SNAPSHOT"
default: "0.6.4-SNAPSHOT"

jobs:
release:
Expand Down
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
## Latest

## 0.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 (https://github.com/ClickHouse/clickhouse-java/issues/1464)

### New Features
- [Client-V1/Apache HTTP] More configuration parameters for connection management. Useful for tuning performance.
(https://github.com/ClickHouse/clickhouse-java/pull/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.
If `FIFO` is selected then connections are reused in the order they were created. It results in even distribution of connections.
If `LIFO` is selected then connections are reused as soon they are returned to the pool.
Note: only for `APACHE_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 https://github.com/ClickHouse/clickhouse-java/pull/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.
- [Client-V2] All operations are now executed in calling thread to avoid extra threads creation.
Async operations can be enabled by `com.clickhouse.client.api.Client.Builder.useAsyncRequests` (https://github.com/ClickHouse/clickhouse-java/pull/1767)
- [Client-V2] Content and HTTP native compression is supported now Currently only LZ4 is available. (https://github.com/ClickHouse/clickhouse-java/pull/1761)
- [Client-V2] HTTPS support added. Required to communicate with ClickHouse Cloud Services.
Client certificates are supported, too. (https://github.com/ClickHouse/clickhouse-java/pull/1753)
- [Client-V2] Added support for HTTP proxy (https://github.com/ClickHouse/clickhouse-java/pull/1748)

### Documentation
- [Client-V2] Spring Demo Service as usage example (https://github.com/ClickHouse/clickhouse-java/pull/1765)
- [Client-V2] Examples for using text based formats (https://github.com/ClickHouse/clickhouse-java/pull/1752)


### Bug Fixes
- [Client-V2] Data is read fully from a stream. Important for Cloud instances (https://github.com/ClickHouse/clickhouse-java/pull/1759)
- [Client-V2] Timezone from a server response is now used to parse DateTime values (https://github.com/ClickHouse/clickhouse-java/pull/1763)
- [Client-V1] Timezone from a server response is now used to parse DateTime values (https://github.com/ClickHouse/clickhouse-java/issues/1464)

## 0.6.3

### Important Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public enum ClickHouseHttpOption implements ClickHouseOption {
"The time in milliseconds after which the connection is validated after inactivity."),

/**
* Whether to retry on failure with AsyncHttpClient. Failure includes some 'critical' IO exceptions:
* Whether to retry on failure with Apache HTTP Client. Failure includes some 'critical' IO exceptions:
* <ul>
* <li>{@code org.apache.hc.core5.http.ConnectionClosedException}</li>
* <li>{@code org.apache.hc.core5.http.NoHttpResponseException}</li>
Expand All @@ -90,7 +90,7 @@ public enum ClickHouseHttpOption implements ClickHouseOption {
AHC_RETRY_ON_FAILURE("ahc_retry_on_failure", false, "Whether to retry on failure with AsyncHttpClient."),

/**
* Configuration for AsyncHttpClient connection pool. It defines how to reuse connections.
* Configuration for Apache HTTP Client connection pool. It defines how to reuse connections.
* If {@code "FIFO"} is set, the connections are reused in the order they were created.
* If {@code "LIFO"} is set, the connections are reused as soon they are available.
* Default value is {@code "LIFO"}.
Expand Down
2 changes: 1 addition & 1 deletion examples/client-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<clickhouse-java.version>0.6.3-SNAPSHOT</clickhouse-java.version>
<clickhouse-java.version>0.6.4-SNAPSHOT</clickhouse-java.version>
<apache-httpclient.version>5.2.1</apache-httpclient.version>

<compiler-plugin.version>3.8.1</compiler-plugin.version>
Expand Down
4 changes: 2 additions & 2 deletions examples/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<clickhouse-java.version>0.6.3-SNAPSHOT</clickhouse-java.version>
<clickhouse-java.version>0.6.4-SNAPSHOT</clickhouse-java.version>
<!-- Nightly snapshot version from https://s01.oss.sonatype.org/content/repositories/snapshots/ or latest from local -->
<!-- <clickhouse-java.version>0.6.3-SNAPSHOT</clickhouse-java.version>-->
<!-- <clickhouse-java.version>0.6.4-SNAPSHOT</clickhouse-java.version>-->

<apache-httpclient.version>5.2.1</apache-httpclient.version>

Expand Down
4 changes: 2 additions & 2 deletions examples/demo-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ dependencies {

// -- clickhouse dependencies
// Main dependency
implementation("com.clickhouse:client-v2:0.6.3-SNAPSHOT") // nightly build
// implementation("com.clickhouse:client-v2:0.6.3") // stable version
implementation("com.clickhouse:client-v2:0.6.4-SNAPSHOT") // nightly build
// implementation("com.clickhouse:client-v2:0.6.4") // stable version
// http client used by clickhouse client
implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1")
// compression dependencies
Expand Down
2 changes: 1 addition & 1 deletion examples/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<clickhouse-java.version>0.6.3-SNAPSHOT</clickhouse-java.version>
<clickhouse-java.version>0.6.4-SNAPSHOT</clickhouse-java.version>
<hikaricp.version>4.0.3</hikaricp.version>
<apache-httpclient.version>5.2.1</apache-httpclient.version>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</distributionManagement>

<properties>
<revision>0.6.3-SNAPSHOT</revision>
<revision>0.6.4-SNAPSHOT</revision>
<project.current.year>2024</project.current.year>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand Down

0 comments on commit fc8d92e

Please sign in to comment.