Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[client-v2] Fix ClickHouseLZ4OutputStream sending extra bytes when income buffer is empty #2000

Merged
merged 3 commits into from
Dec 7, 2024

Conversation

chernser
Copy link
Contributor

@chernser chernser commented Dec 4, 2024

Summary

If ClickHouseLZ4OutputStream#flush() is called when input buffer is empty (no data to compress) then ClickHouseLZ4OutputStream will create an empty frame that will cause error on server side like:
Can't decompress data: header is corrupt with decompressed block size 0: While executing ParallelParsingBlockInputFormat. (CANNOT_DECOMPRESS)

Closes: #1993

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

@chernser chernser changed the title added some tests [client-v2] Fix ClickHouseLZ4OutputStream sending extra bytes when income buffer is empty Dec 7, 2024
@chernser chernser marked this pull request as ready for review December 7, 2024 01:13
@chernser chernser merged commit 7be8d90 into main Dec 7, 2024
59 of 60 checks passed
@chernser chernser deleted the v2_connection_problems_investigation branch December 7, 2024 03:06
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.

[client-v2] Error "Can't decompress data: header is corrupt" when using client compression
2 participants