Conversation
chernser
requested changes
Sep 10, 2026
chernser
left a comment
Contributor
There was a problem hiding this comment.
There are two tests failing:
[INFO]
[ERROR] Failures:
[ERROR] StatementTest.testConnectionExhaustion:653 Exception expected
[ERROR] StatementTest.testUpdateQueryWithResultSet:1333 Connection seems closed when should not expected [true] but found [false]
[INFO]
[ERROR] Tests run: 469, Failures: 2, Errors: 0, Skipped: 0
[INFO]
I've tested locally with the command:
~/tmp/clickhouse-java codex/issue-3077-stream-timeout$ mvn -DclickhouseVersion=26.3 clean verify
Limit normal tagged-response reads to the caller's requested length so parsing result metadata does not release pooled HTTP connections prematurely. Preserve exception-marker lookahead and add small-read regression coverage.
Preserve tagged-response streaming documentation alongside upstream query format settings. Verified client-v2 and jdbc-v2 unit tests and both connection-pool regression tests against ClickHouse 26.3.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
Reviewed by Cursor Bugbot for commit 19dca3a. Configure here.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
ClickHouse can append a tagged exception frame to an HTTP 200 response after streaming result data. This change detects and validates that frame so callers receive the server error when they reach it.
X-ClickHouse-Exception-Tag, its UTF-8 message byte length, and its end marker. Preserve ordinary payload bytes and mismatched markers.SQLTimeoutException/HYT00, retaining vendor code and cause. Retain the existing error-60 mapping to42S02.CHANGELOG.mdanddocs/features.md.Closes #2702
Closes #3077
Compatibility
No existing public method signatures, configuration defaults, or successful result formats are changed by this PR.
HEADER_EXCEPTION_TAGandSQL_STATE_TIMEOUTare additive constants. Tagged server failures intentionally become exceptions instead of result data. The branch incorporates upstream main throughae682fcbd; its socket-buffer documentation and defaults are retained.Validation
On the merge with current main (2026-09-18), Maven reactor
verifycompleted successfully with JDK 17.0.19, Maven 3.9.16, UTC, and integration tests skipped:Command:
mvn -t <local-jdk17-toolchains.xml> -pl jdbc-v2 -am -Duser.timezone=UTC -DskipITs=true -Dmaven.javadoc.skip=true verify.The live-server integration tests could not be rerun on this merge because local Docker Desktop failed to start while initializing its Inference manager. No full integration-suite pass is claimed. GitHub CI still requires its own successful run.
The focused coverage includes split exception markers, mismatched tags, incomplete and invalid frames, UTF-8 lengths, compressed responses, interrupted HTTP chunk framing, last-row delivery, and JDBC error mapping.
On 2026-09-11, both originally reported integration failures (
StatementTest#testConnectionExhaustionandStatementTest#testUpdateQueryWithResultSet) passed against ClickHouse 26.3.33.24 after the fixes. This historical result does not substitute for validation on the current merge.