From ba4fc79a10b13547b1b9aff744e4a6612f60715d Mon Sep 17 00:00:00 2001 From: Sergey Chernov Date: Thu, 15 Aug 2024 23:58:09 -0700 Subject: [PATCH 1/3] change log update --- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 2 +- CHANGELOG.md | 41 ++++++++++++++++++++++++++ examples/client-v2/pom.xml | 2 +- examples/client/pom.xml | 4 +-- examples/demo-service/build.gradle.kts | 4 +-- examples/jdbc/pom.xml | 2 +- pom.xml | 2 +- 8 files changed, 50 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index f0057da5e..a756814cc 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -12,7 +12,7 @@ on: env: CHC_BRANCH: "main" - CHC_VERSION: "0.6.3" + CHC_VERSION: "0.6.4" jobs: nightly: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0dc09d5d..7918d4231 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: version: description: "Release version" required: true - default: "0.6.3-SNAPSHOT" + default: "0.6.4-SNAPSHOT" jobs: release: diff --git a/CHANGELOG.md b/CHANGELOG.md index 20e639a95..06e48cda3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ ## Latest +## 0.6.4 + +### Important +- 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. + +### 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 - to configure how connection +are resued in the connection pool. + - 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 - total max connections per route. + - 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] Spring Demo Service as usage example (https://github.com/ClickHouse/clickhouse-java/pull/1765) +- [Client-V2] More examples for using text based formats (https://github.com/ClickHouse/clickhouse-java/pull/1752) +- [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) + +### 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 diff --git a/examples/client-v2/pom.xml b/examples/client-v2/pom.xml index 7ef11e865..73a8697c4 100644 --- a/examples/client-v2/pom.xml +++ b/examples/client-v2/pom.xml @@ -64,7 +64,7 @@ UTF-8 UTF-8 - 0.6.3-SNAPSHOT + 0.6.4-SNAPSHOT 5.2.1 3.8.1 diff --git a/examples/client/pom.xml b/examples/client/pom.xml index 87a4b4f89..236ba85aa 100644 --- a/examples/client/pom.xml +++ b/examples/client/pom.xml @@ -66,9 +66,9 @@ UTF-8 UTF-8 - 0.6.3-SNAPSHOT + 0.6.4-SNAPSHOT - + 5.2.1 diff --git a/examples/demo-service/build.gradle.kts b/examples/demo-service/build.gradle.kts index f68c548e9..f41a23320 100644 --- a/examples/demo-service/build.gradle.kts +++ b/examples/demo-service/build.gradle.kts @@ -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 diff --git a/examples/jdbc/pom.xml b/examples/jdbc/pom.xml index 78ed45067..05e2859c8 100644 --- a/examples/jdbc/pom.xml +++ b/examples/jdbc/pom.xml @@ -66,7 +66,7 @@ UTF-8 UTF-8 - 0.6.3-SNAPSHOT + 0.6.4-SNAPSHOT 4.0.3 5.2.1 diff --git a/pom.xml b/pom.xml index 7d4a69b83..0b7c31b3a 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ - 0.6.3-SNAPSHOT + 0.6.4-SNAPSHOT 2024 UTF-8 UTF-8 From 85b4cec7180a82fc60eb0364b50d2889851d40a0 Mon Sep 17 00:00:00 2001 From: Sergey Chernov Date: Fri, 16 Aug 2024 11:01:31 -0700 Subject: [PATCH 2/3] renamed important changes to deprecations --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06e48cda3..a668480e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## 0.6.4 -### Important +### Deprecations - Following components will be deprecated and archived in next release: - clickhouse-cli-client - clickhouse-grpc-client From 047c8acfbf1be6d3288ee708ac9587ec8fad2ce2 Mon Sep 17 00:00:00 2001 From: Sergey Chernov Date: Fri, 16 Aug 2024 17:02:46 -0700 Subject: [PATCH 3/3] updated changelog and javadoc --- CHANGELOG.md | 22 ++++++++++++++----- .../http/config/ClickHouseHttpOption.java | 4 ++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a668480e4..f8958083d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,33 +9,43 @@ - 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. + - 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 - to configure how connection -are resued in the connection pool. + - 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 - total max connections per route. + - 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] Spring Demo Service as usage example (https://github.com/ClickHouse/clickhouse-java/pull/1765) -- [Client-V2] More examples for using text based formats (https://github.com/ClickHouse/clickhouse-java/pull/1752) - [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) diff --git a/clickhouse-http-client/src/main/java/com/clickhouse/client/http/config/ClickHouseHttpOption.java b/clickhouse-http-client/src/main/java/com/clickhouse/client/http/config/ClickHouseHttpOption.java index eb267cf25..3316d737a 100644 --- a/clickhouse-http-client/src/main/java/com/clickhouse/client/http/config/ClickHouseHttpOption.java +++ b/clickhouse-http-client/src/main/java/com/clickhouse/client/http/config/ClickHouseHttpOption.java @@ -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: *
    *
  • {@code org.apache.hc.core5.http.ConnectionClosedException}
  • *
  • {@code org.apache.hc.core5.http.NoHttpResponseException}
  • @@ -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"}.