Repository navigation
Conversation
The adaptive footer read (`clamp(file_size / 100, 128 KiB, 2 MiB)`, backported from 115686) saves a round trip on object storage, but for a local file a second read is cheap and the larger tail only costs bytes on every open. `Prefetcher` now records `ReadBufferFromFileBase::isRegularLocalFile`, and `Reader::readFileMetaData` reads 64 KiB when `input_format_parquet_footer_read_size` is 0 and the file is a regular local file. Other sources and an explicit non-zero setting are unchanged. Cherry-picked from 5a58f22; the setting description and the test follow the 26.8 layout (`05385_parquet_footer_read_size`). ClickHouse#124883 Related: ClickHouse#124673 Related: #2181
…m master. The setting description of `input_format_parquet_footer_read_size` now says the 64 KiB tail applies when the file is read directly from the local filesystem (the reader's buffer reports `isRegularLocalFile`). Reads through a file descriptor or a wrapping buffer keep the adaptive size. The `SettingsChangesHistory` reason no longer says that `0` keeps the adaptive behavior. Cherry-picked from 6fbb4e7; on 26.8 the history reason is in `SettingsChangesHistory.cpp`, so it is changed there. ClickHouse#124883 Related: #2181
CI analysis for head
|
| Check | Classification | Caused by this PR? |
|---|---|---|
| RegressionTestsRelease / Swarms | Pre-existing: same 3 scenarios fail on antalya-26.8 |
No |
| RegressionTestsRelease / Iceberg (2) | Flaky/infra: timed out on rerun; passed on attempt 1 with the same SHA | No |
| Grype Scan (keeper, server-alpine) | Pre-existing: image CVEs, fails on base too | No |
| DCO | Process: commits have no Signed-off-by |
No (no code involved) |
1. Swarms: pre-existing
✘ 1m 51s [ Fail ] /swarms/feature/node failure/check restart swarm node
✘ 5m 3s [ Fail ] /swarms/feature/node failure/cpu overload
✘ 5m 7s [ Fail ] /swarms/feature/node failure/cpu overload all swarm nodes
File ".../swarms/tests/node_failure.py", line 108, in run_long_query
assert result.exitcode in expected_exitcodes, error(
The same three node failure scenarios fail in the antalya-26.8 MasterCI nightly runs for 2026-11-25 (base has one more failure on top) and 2026-11-24. They also failed on attempt 1 of this PR's run. These tests kill or overload swarm nodes and check the exit codes. They don't read Parquet footers, and the PR only changes the footer read size for local files.
Next step: nothing to do on this PR.
2. Iceberg (2): job timeout on rerun, flaky/infra
Job (run attempt 2): the suite started at 22:33, printed no failures (it runs with --output new-fails), and was cancelled by the 210-minute job timeout:
2026-11-26T01:58:40Z ##[error]The operation was canceled.
Evidence it's not the PR:
- On attempt 1 of the same run (same SHA
b5cd583),Iceberg (2)passed in 1h53m. The commit statusRegression release iceberg_2is green with 1923 scenarios (1851 ok, 53 skipped, 19 xfail). - On other
antalya-26.8PRs the same evening, Iceberg (2) took between 1h45m and 2h20m and passed. - Iceberg tests read mostly from MinIO/S3/Glue. For those sources the PR leaves the footer read unchanged. It only switches regular local files from the adaptive size to 64 KiB, and the second footer read path that this can trigger is already covered by
05385.
Next step: safe to re-run the job.
3. Grype scans (keeper and server -alpine): pre-existing
Both images report the same 5 High CVEs: CVE-2026-107493, CVE-2026-107494, CVE-2026-121482, CVE-2026-124709, CVE-2026-84786. Both Grype jobs also fail in the antalya-26.8 nightlies (2026-11-24 and 2026-11-25) and on other open PRs (for example run 45692500834). The CVEs come from the image's base layers, and this PR doesn't touch Docker or dependencies.
Next step: nothing to do on this PR. The fix is an image or base-layer update on the release branch.
4. DCO: process
Neither commit (068bf8422e, 131e924cb5) has a Signed-off-by: trailer, which is what the DCO app checks. It has nothing to do with the code. If DCO is enforced for this branch, someone needs to add sign-offs. That means rewriting the commits and force-pushing, which I'm not allowed to do, so the author would have to do it. Otherwise, it can be waived the usual way.
Evidence: praktika report PRs/2949/b5cd583…/result_pr.json (all OK), Actions run 45637521601 (attempts 1 and 2), base-branch MasterCI runs linked above. I didn't run anything locally; everything here comes from the CI evidence.
Backport of ClickHouse#124883 to
antalya-26.8. It is a prerequisite for the Parquet footer-size hint and the reuse of the footer tail, which are split out of #2181 into a separate pull request that goes on top of this one.antalya-26.8already reads a footer tail sized to the file (1%, clamped to[128 KiB, 2 MiB]), from the backport of ClickHouse#115686. That saves a round trip on object storage. For a local file a second read is cheap, and the larger tail only costs bytes on every open.With this change
PrefetcherrecordsReadBufferFromFileBase::isRegularLocalFile, andReader::readFileMetaDatareads a 64 KiB tail wheninput_format_parquet_footer_read_sizeis 0 and the file is a regular local file. Object storage, URL and HDFS reads, and an explicit non-zero setting, are unchanged. Upstream measuredSELECT count()over 100 ClickBench Parquet files at 6.55 MB of footer tails instead of 140.7 MB.It is a cherry-pick of two commits of that pull request:
5a58f229ecb0(the change and the test) and6fbb4e7e880b(the precise wording of the setting description and of the history reason). Compared with upstream, the history row ofinput_format_parquet_footer_read_sizeis inSettingsChangesHistory.cppon 26.8 instead of inline inFormatFactorySettings.h, so the reason text is changed there, and the test is the 26.805385_parquet_footer_read_sizeinstead of05025_....Tests:
05385_parquet_footer_read_sizenow checks that a default read of a local file reads the same number of bytes (65536) as an explicitinput_format_parquet_footer_read_size = 65536. It fails on the base binary (131072for the default) and passes with the change. All 204 stateless tests withparquetin the name pass, as do03999_stateless_settings_history,02326_settings_changes_system_tableand04652_system_documentation_settings_historyafter the second commit. This was run in the Praktika functional job on a local aarch64 build; PR CI has not run yet.Related: ClickHouse#124883
Related: #2181
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Reading Parquet files from the local filesystem fetches a 64 KiB footer tail by default instead of a tail sized to the file, which cuts the bytes read when opening many files (ClickHouse#124883 by @groeneai )
Documentation entry for user-facing changes
The description of
input_format_parquet_footer_read_sizenow states the default for local files.CI/CD Options
Exclude tests:
Regression jobs to run: