Repository navigation
Apply http_zlib_compression_level only to zlib-based HTTP compression - #125899
Conversation
The HTTP handler passed `http_zlib_compression_level` to every response compression method, including `zstd`, `lz4`, `xz`, `br` and `bz2`, which have their own ranges and meanings of levels. For example, `lz4` switches to the slow high-compression mode starting from level 2, and level 12 (valid for zlib with `libdeflate`) is invalid for `xz`. Now `http_zlib_compression_level` applies only to `gzip` and `deflate`, and other methods use `output_format_compression_level`. Both default to 3, so the default behavior does not change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…flate` Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [b2efe91] Summary: ✅
AI ReviewSummaryThis PR restricts Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing Binary sizes
The official master build is compiled with Object file sizes
|
| Object file | Master | PR | Δ |
|---|---|---|---|
src/CMakeFiles/dbms.dir/DataTypes/TypeFunctions.cpp.o |
new | 1.00 MiB | +1.00 MiB |
src/CMakeFiles/dbms.dir/Interpreters/Aggregator.cpp.o |
25.56 MiB | 26.43 MiB | +895.89 KiB (+3.42%) |
src/CMakeFiles/dbms.dir/DataTypes/TypeMatchers.cpp.o |
new | 692.78 KiB | +692.78 KiB |
src/CMakeFiles/dbms.dir/DataTypes/FunctionSignature.cpp.o |
new | 417.14 KiB | +417.14 KiB |
src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/arrayDotProduct.cpp.o |
1.75 MiB | 1.55 MiB | -201.52 KiB (-11.24%) |
src/CMakeFiles/dbms.dir/Functions/FunctionsConversion_impl2.cpp.o |
1.31 MiB | 1.14 MiB | -174.78 KiB (-13.07%) |
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/FunctionsBitmap.cpp.o |
2.58 MiB | 2.41 MiB | -167.40 KiB (-6.35%) |
src/CMakeFiles/dbms.dir/Functions/FunctionsConversion_impl1.cpp.o |
1.12 MiB | 986.07 KiB | -160.78 KiB (-14.02%) |
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/vectorFunctions.cpp.o |
3.29 MiB | 3.43 MiB | +148.59 KiB (+4.41%) |
src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/arrayCumSumNonNegative.cpp.o |
603.16 KiB | 466.82 KiB | -136.34 KiB (-22.60%) |
src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/arrayCumSum.cpp.o |
673.15 KiB | 538.16 KiB | -134.99 KiB (-20.05%) |
src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/arrayAggregation.cpp.o |
1.29 MiB | 1.16 MiB | -134.86 KiB (-10.22%) |
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/FunctionsCodingIP.cpp.o |
1.27 MiB | 1.13 MiB | -133.67 KiB (-10.32%) |
src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/arrayDifference.cpp.o |
592.61 KiB | 478.04 KiB | -114.56 KiB (-19.33%) |
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/FunctionsJSON.cpp.o |
4.26 MiB | 4.37 MiB | +111.80 KiB (+2.57%) |
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/FunctionsHashingMisc.cpp.o |
5.53 MiB | 5.61 MiB | +83.25 KiB (+1.47%) |
src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/arrayDistance.cpp.o |
10.19 MiB | 10.11 MiB | -78.98 KiB (-0.76%) |
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/FunctionsConversion_reg.cpp.o |
6.83 MiB | 6.75 MiB | -78.39 KiB (-1.12%) |
src/CMakeFiles/dbms.dir/Functions/FunctionsConversion_impl3.cpp.o |
1.87 MiB | 1.80 MiB | -76.37 KiB (-3.98%) |
src/CMakeFiles/dbms.dir/Functions/IFunction.cpp.o |
555.11 KiB | 631.16 KiB | +76.05 KiB (+13.70%) |
719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.
Compile time of recompiled translation units
2853 translation units recompiled, 15691 s compile time in total, 2848 of them have a recent master baseline.
Translation units without a recent master baseline:
programs/keeper/Keeper.cpp (clickhouse-keeper): 7.7 ssrc/DataTypes/TypeFunctions.cpp: 6.5 s
Backport #125899 to 26.9: Apply `http_zlib_compression_level` only to zlib-based HTTP compression
Backport #125899 to 26.8: Apply `http_zlib_compression_level` only to zlib-based HTTP compression
Keep only the change of `HTTPHandler::processQuery` that selects the level by compression method (`http_zlib_compression_level` for `gzip` and `deflate`, `output_format_compression_level` otherwise). The generic response compression from the `compression` setting and `snappy_mode` do not exist in 26.3, and the `http_zlib_compression_level` documentation keeps the 26.3 range of possible values. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cherry pick #125899 to 26.3: Apply `http_zlib_compression_level` only to zlib-based HTTP compression
… zlib-based HTTP compression
Keep only the change of `HTTPHandler::processQuery` that selects the level by compression method (`http_zlib_compression_level` for `gzip` and `deflate`, `output_format_compression_level` otherwise). The generic response compression from the `compression` setting does not exist in 26.7. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cherry pick #125899 to 26.7: Apply `http_zlib_compression_level` only to zlib-based HTTP compression
… zlib-based HTTP compression
Backport #125899 to 26.3: Apply `http_zlib_compression_level` only to zlib-based HTTP compression
Backport #125899 to 26.7: Apply `http_zlib_compression_level` only to zlib-based HTTP compression
Backport #125899 to 26.10: Apply `http_zlib_compression_level` only to zlib-based HTTP compression
ClickHouse#125899 linked `output_format_compression_level` and `http_zlib_compression_level` to each other with in-page `#anchor` links. The two settings are rendered into different generated settings families (format settings and session settings). The docs generator resolves an in-page setting anchor only against the routes of the current family, so an anchor of the other family falls back to that family's catch-all `other` page, which does not contain it. The daily docs regeneration PR (ClickHouse#126475) then fails `Check internal links and anchors`: reference/settings/formats/other#http_zlib_compression_level | Cannot find fragment reference/settings/session-settings/other#output_format_compression_level | Cannot find fragment Link to the absolute shard routes instead, as the existing cross-family links already do (`min_insert_block_size_bytes` in FormatFactorySettings.h, `input_format_json_named_tuples_as_objects` in Settings.cpp). The generator does not rewrite a link that points into another family, so the routes are rendered verbatim. Validated by regenerating the full docs tree with the patched binary and running the CI lychee links check: 2 errors before, 0 after. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…l` only to zlib-based HTTP compression
The HTTP handler passed
http_zlib_compression_levelto every response compression method (both fromAccept-Encodingwithenable_http_compression = 1and from thecompressionsetting), includingzstd,lz4,xz,brandbz2. These methods have their own ranges and meanings of levels: for example,lz4switches to the slow high-compression mode starting from level 2, and level 12 (valid for zlib withlibdeflate) makesxzfail withlzma preset failed, so the request returns HTTP 500.Now
http_zlib_compression_levelapplies only togzipanddeflate. Other methods useoutput_format_compression_level, the generic setting for the level of compressed query output. Both settings default to 3, so the default behavior does not change.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The setting
http_zlib_compression_levelnow applies only to thegzipanddeflateHTTP response compression. The level of other methods (zstd,lz4,br,xz,bz2) is controlled byoutput_format_compression_level. Previously, a level suitable for zlib was passed to every method, which could makelz4unexpectedly slow or makexzfail.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/125899]
Version info
26.11.1.97-master(included in26.11and later)26.10.2.10,26.9.21.6,26.8.30.5,26.7.33.4,26.3.54.6