Skip to content

Handle late ClickHouse HTTP exceptions - #403

Open
ruslandoga wants to merge 8 commits into
masterfrom
rd/clickhouse-http-errors
Open

Handle late ClickHouse HTTP exceptions#403
ruslandoga wants to merge 8 commits into
masterfrom
rd/clickhouse-http-errors

Conversation

@ruslandoga

@ruslandoga ruslandoga commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Detects ClickHouse exceptions that are appended after a 200 OK response has begun, including the deliberate connection close used to signal an incomplete HTTP response. For the default RowBinaryWithNamesAndTypes format, the accumulated response and exception tag are passed to the RowBinary decoder, which validates the trailer against that tag, its recorded message length, and ClickHouse's 16 KiB bound before returning Ch.Error; unmatched truncation remains a Mint transport error. The restored DBConnection path discards the closed connection without retrying the failed query, while non-RowBinary formats retain their existing behavior. Adds a tagged real-ClickHouse regression test and excludes it on the older CI server version.

@ruslandoga ruslandoga changed the title Add regression test for late ClickHouse HTTP exceptions Handle late ClickHouse HTTP exceptions Aug 3, 2026
@ruslandoga
ruslandoga force-pushed the rd/clickhouse-http-errors branch from fe719c2 to 87d7cd0 Compare August 9, 2026 15:11
@ruslandoga

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant