Repository navigation
Bump brotli from v1.0.9 to v1.2.0 - #119096
Conversation
Update `brotli` from `v1.0.9` (plus one ClickHouse commit that removed the recursive `research/esaxx` and `research/libdivsufsort` submodules) to the upstream release `v1.2.0`. Upstream `v1.2.0` no longer has a `.gitmodules` file, so the only reason for the `ClickHouse/brotli` fork is gone and the submodule now points directly at `https://github.com/google/brotli`. Build integration changes in `contrib/brotli-cmake/CMakeLists.txt`: - Added the new sources `common/shared_dictionary.c`, `dec/prefix.c`, `dec/static_init.c`, `enc/compound_dictionary.c`, `enc/static_dict_lut.c` and `enc/static_init.c`. The list now matches every `*.c` file under `c/common`, `c/dec` and `c/enc`, which is exactly what upstream's own `CMakeLists.txt` globs. `enc/static_init_lazy.cc` is deliberately left out: it is only used with `BROTLI_STATIC_INIT_LAZY`, and the default is `BROTLI_STATIC_INIT_NONE`. - Removed `BROTLI_BUILD_PORTABLE=1`; the macro no longer exists anywhere in the `brotli` sources. The public C API is additive (shared/compound dictionaries, decoder metadata callbacks, `BrotliEncoderEstimatePeakMemoryUsage`), so `BrotliReadBuffer` and `BrotliWriteBuffer` need no changes. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Workflow [PR], commit [f8603ad] Summary: ✅
AI ReviewSummaryThis PR updates vendored Findings
Tests
Final Verdict
LLVM Coverage ReportMeasured on commit f8603ad.
Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage). Newly covered: +198 lines in 52 files (-111 lines lost coverage) · Details |
Build profile diff (arm_release)Comparing Binary sizes
The official master build is compiled with Object file sizes
|
| Object file | Master | PR | Δ |
|---|---|---|---|
contrib/brotli-cmake/CMakeFiles/_brotli.dir/__/brotli/c/enc/static_dict_lut.c.o |
new | 331.87 KiB | +331.87 KiB |
contrib/brotli-cmake/CMakeFiles/_brotli.dir/__/brotli/c/enc/encoder_dict.c.o |
333.49 KiB | 7.02 KiB | -326.47 KiB (-97.89%) |
contrib/brotli-cmake/CMakeFiles/_brotli.dir/__/brotli/c/enc/backward_references.c.o |
116.44 KiB | 296.61 KiB | +180.17 KiB (+154.73%) |
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
57 translation units recompiled, 100 s compile time in total, 51 of them have a recent master baseline.
| set(SRCS | ||
| "${BROTLI_SOURCE_DIR}/enc/command.c" | ||
| "${BROTLI_SOURCE_DIR}/enc/fast_log.c" | ||
| "${BROTLI_SOURCE_DIR}/common/constants.c" |
There was a problem hiding this comment.
The PR body promises that data written by the previous vendored brotli still decodes correctly after this bump, but I do not see any test that actually exercises that contract. The existing brotli coverage (00302_http_compression.sh, 01059_storage_file_compression.sh, 02115_write_buffers_finalize.sh, etc.) is current-version round trips / CLI interop, so it would not catch a regression where ClickHouse stops reading a stream produced by the old vendored encoder.
Please add one focused stateless fixture generated by the previous vendored submodule commit and verify that current ClickHouse still reads it through one of the brotli read paths (File, file, or HTTP Content-Encoding: br).
Upstream `v1.2.0` applies `__attribute__((model("small")))` through
`BROTLI_MODEL` whenever the compiler supports the `model` attribute, which
breaks the loongarch64 build with `code model 'small' is not supported on
this target`. Point the submodule back to the `ClickHouse/brotli` fork, at
branch `ClickHouse/v1.2.0`: `v1.2.0` plus the cherry-picked upstream commit
google/brotli@e230f474b8 ("disable BROTLI_MODEL macro for some targets").
CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=119096&sha=3f405fc724ee1ee5db9603cb47188f5129beca8b&name_0=PR&name_1=Build%20%28loongarch64%29
PR: ClickHouse#119096
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the `contrib/brotli` submodule conflict by taking the cherry-picked pin `2d9c9b61f4e7` (v1.2.1). 26.9 is still on v1.0.9, so the merge keeps master's `contrib/brotli-cmake/CMakeLists.txt` from #119096, which v1.2.x needs to link.
The merge of `backport/26.9/127419` kept 26.9's `contrib/brotli-cmake/CMakeLists.txt`, which lists the v1.0.9 sources. The cherry-picked pin is v1.2.1, which needs the build script from #119096 to link. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge backport/26.3/127419 into cherrypick/26.3/127419. The only conflict is the contrib/brotli submodule: 26.3 pins brotli v1.0.9 (d224526f8fa7), while master moved v1.2.0 -> v1.2.1. Take the master pin 2d9c9b61f4e7 (the ClickHouse fork of v1.2.1) and master's contrib/brotli-cmake/CMakeLists.txt source list from #119096 (v1.0.9 -> v1.2.0), without which v1.2.x does not link. src/CMakeLists.txt and the new gtest merge cleanly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge backport/26.8/127419 into cherrypick/26.8/127419. The only conflict is the contrib/brotli submodule: 26.8 pins brotli v1.0.9 (d224526f8fa7), while master moved v1.2.0 -> v1.2.1. Take the master pin 2d9c9b61f4e7 (the ClickHouse fork of v1.2.1) and master's contrib/brotli-cmake/CMakeLists.txt source list from #119096 (v1.0.9 -> v1.2.0), without which v1.2.x does not link. src/CMakeLists.txt and the new gtest merge cleanly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bumps
brotlito the upstreamv1.2.0release tag (fromv1.0.9, released 2020), picking up two upstream releases including shared/compound dictionary support.ClickHouse-side changes
.gitmodules— pointscontrib/brotliathttps://github.com/google/brotli; the fork's only patch (removing recursive submodules) is obsolete because upstreamv1.2.0has no.gitmodules, and the fork has nov1.2.0tag.contrib/brotli-cmake/CMakeLists.txt—SRCSresynced with upstream'sc/{common,dec,enc}/*.cglob, addingcommon/shared_dictionary.c,dec/prefix.c,dec/static_init.c,enc/compound_dictionary.c,enc/static_dict_lut.c,enc/static_init.c; dropped theBROTLI_BUILD_PORTABLEdefine, which no longer exists upstream.Behaviour changes
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Update
brotlito v1.2.0.Workflow [PR]
Sync PR [sync-upstream/pr/119096]
Version info
26.10.1.1594-master(included in26.10and later)