You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repository collaborators can run the JMH benchmark suite against this PR by commenting:
/benchmark
Optional regression threshold override (Δ% on Time or Alloc/op; defaults to 10%):
/benchmark threshold=15
Only one benchmark run per PR is active at a time — issuing a new /benchmark comment cancels the previous run. After the run finishes a separate comment will be posted comparing it against the latest scheduled run on main; the PR check fails if any benchmark regresses by more than the threshold.
Summary
This PR introduces a new public TransportException class in client-v2 that extends ClickHouseException, intended to categorize transport-layer failures (currently SSL errors) that are non-retryable. The HttpAPIClientHelper.wrapException method is updated to throw TransportException instead of plain ClickHouseException when wrapping SSLException. A new queryId-bearing constructor is also added to ClientException to support the constructor chain. An integration test is added to verify the new exception type is thrown and carries the correct query ID and cause.
What this impacts
client-v2 public exception API: new TransportException class added to com.clickhouse.client.api package
SSL error handling behavior in HttpAPIClientHelper — SSL exceptions now surface as TransportException rather than ClickHouseException
Existing catch blocks for ClickHouseException are unaffected (additive subtype), but consumers explicitly checking instanceof ClickHouseException and expecting SSL errors to be "retryable" may see changed behavior (isRetryable = false is now explicitly set)
Concerns
Medium risk rule fires: behavioral change in a single hot-path module (client-v2/) — exception type thrown for SSL failures changes from ClickHouseException to TransportException
No linked issue in the PR body (checklist item left blank); a non-trivial feature addition without an associated issue makes it harder to assess the full requirements intent
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds a new TransportException in client-v2 to better classify transport-layer failures (currently used for SSL-related issues) and extends integration tests to validate the new exception type.
Changes:
Introduced TransportException as a dedicated exception type for transport-layer failures.
Updated HTTP client exception wrapping to throw TransportException for SSLException.
Added an integration test to assert TransportException is raised for SSL failures; added a ClientException ctor that accepts queryId.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Checklist
Delete items not relevant to your PR: