-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Make Poco HTTP Server zero-copy again #19516
Conversation
Fuzzer (debug): #20046 |
Ok.
|
* master: (160 commits) Make Poco HTTP Server zero-copy again (ClickHouse#19516) Fixed documentation ccache 4.2+ does not requires any quirks for SOURCE_DATE_EPOCH Add a function `htmlOrXmlCoarseParse` to extract content from html or xml format string. (ClickHouse#19600) Reinterpret function added Decimal, DateTim64 support Add test Update InterpreterSelectQuery.cpp Improved serialization for data types combined of Arrays and Tuples. Improved matching enum data types to protobuf enum type. Fixed serialization of the Map data type. Omitted values are now set by default. Log stdout and stderr when failed to start docker in integration tests. Added comment Don't backport base commit of branch in the same branch (ClickHouse#20628) Fix fasttest retry for failed tests Dictionary create source with functions crash fix Added error reinterpretation tests Update run.sh Updated documentation fix subquery with limit Rename untyped function reinterpretAs into reinterpret ignore data store files Support vhost ...
* master: Add gdb to fasttest image Make Poco HTTP Server zero-copy again (ClickHouse#19516) Use fixed version for aerospike Fixed documentation ccache 4.2+ does not requires any quirks for SOURCE_DATE_EPOCH Reinterpret function added Decimal, DateTim64 support test/stress: fix permissions for clickhouse directories test/stress: improve backtrace catching on server failures test/stress: use clickhouse builtin start/stop to run server from the same user Added error reinterpretation tests Updated documentation Rename untyped function reinterpretAs into reinterpret # Conflicts: # src/Server/HTTPHandler.cpp # src/Server/HTTPHandler.h
* master: (153 commits) Add gdb to fasttest image Make Poco HTTP Server zero-copy again (ClickHouse#19516) Use fixed version for aerospike Fixed documentation ccache 4.2+ does not requires any quirks for SOURCE_DATE_EPOCH Add a function `htmlOrXmlCoarseParse` to extract content from html or xml format string. (ClickHouse#19600) Reinterpret function added Decimal, DateTim64 support test/stress: fix permissions for clickhouse directories test/stress: improve backtrace catching on server failures test/stress: use clickhouse builtin start/stop to run server from the same user Add test Update InterpreterSelectQuery.cpp Improved serialization for data types combined of Arrays and Tuples. Improved matching enum data types to protobuf enum type. Fixed serialization of the Map data type. Omitted values are now set by default. Log stdout and stderr when failed to start docker in integration tests. Added comment Don't backport base commit of branch in the same branch (ClickHouse#20628) Fix fasttest retry for failed tests Dictionary create source with functions crash fix Added error reinterpretation tests Update run.sh ...
Why creating copy not changing the poco itself? (we already have a list of own patches to poco). Not easy to see the diff with the current poco version. Is there some chances to push that into the poco upstream? |
No chance. The whole purpose of this patch is to replace iostreams with Read/WriteBuffers. |
Also we are looking into perspective to also rewrite TCPServer. |
At lease now we can remove our unused patches from Poco - for simpler upstream update in the future. |
Cool. Thanks, now it's clear. Makes 100% sence. |
Previously HTTP server does not tries to send exception if something had been written to the client already, but after rewriting to "zero-copy" HTTP implementation (back in ClickHouse#19516) this got broken, and you can get pretty "dangerous" at least at first glance errors, like: - Malformed chunked encoding - or most likely to CHECKSUM_DOESNT_MATCH error This is not crucial because it will never pass checksum checks, but still icky. So let's fix it. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Previously HTTP server does not tries to send exception if something had been written to the client already, but after rewriting to "zero-copy" HTTP implementation (back in ClickHouse#19516) this got broken, and you can get pretty "dangerous" at least at first glance errors, like: - Malformed chunked encoding - or most likely to CHECKSUM_DOESNT_MATCH error This is not crucial because it will never pass checksum checks, but still icky. So let's fix it. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Partially reimplement HTTP server to make it making less copies of incoming and outgoing data. It gives up to 1.5 performance improvement on inserting long records over HTTP.