Flush gzip buffer when cancelling http response buffer#89256
Flush gzip buffer when cancelling http response buffer#89256
Conversation
|
Workflow [PR], commit [fcac704] Summary: ❌
|
Add a tag to the HTTP flush test script.
| @@ -0,0 +1,2 @@ | |||
| zstd OK | |||
There was a problem hiding this comment.
@tavplubix FYI: Currently it also broken on other compressions like brotli
for example
echo "select throwIf(number > 10000000) + number check from numbers(10000005) format CSV" | curl "http://127.0.0.1:8123/?query=&enable_http_compression=1" -H "Accept-Encoding: br" --compressed -v --data-binary @- | tail -c 1024
is the intention is to fix all the broken compression in this PR or just gzip?
(it would be nice to write tests for all the compression supported by CH server?)
There was a problem hiding this comment.
is the intention is to fix all the broken compression in this PR or just gzip?
all, it fixes brotli as well, I added it to the test
(it would be nice to write tests for all the compression supported by CH server?)
curl supports only deflate, gzip, br and zstd, so adding other compression methods to the test is not trivial, but I don't think it's necessary since the fix is generic
|
@tavplubix can we merge this? failing tests looks unrelated? |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Flush buffers when sending an error in the middle of compressed stream in HTTP interface.
Details
See #75175 (comment)
The problem is that
ZlibDeflatingWriteBuffer::nextImpl()doesn't necessarily flush the buffer, we need to finalize it.