Skip to content

Backport #114344 to 26.3: Validate a verbatim codec's declared size in the passthrough read shortcut - #122079

Merged
rienath merged 2 commits into
26.3from
backport/26.3/114344
Sep 25, 2026
Merged

rienath merged 2 commits into
26.3from
backport/26.3/114344

Conversation

@robot-ch-test-poll4

@robot-ch-test-poll4 robot-ch-test-poll4 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #114344

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.3.33.156

@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-backport Changes, backported to release branch. Do not use manually - automated use only! label Sep 24, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [3e823e7]

Summary: ✅

@groeneai

Copy link
Copy Markdown
Collaborator

The only failing check here is the regression test I added in #114344, and neither of its two failures is in the fix it guards. Both are portability problems against this branch.

packed_skip_index_max_bytes does not exist on 26.3, and the test names it in the MergeTree SETTINGS clause, so the DDL is rejected at parse time (Code: 115 ... Unknown setting 'packed_skip_index_max_bytes': for storage MergeTree) and the script exits 115 under set -o pipefail. Earlier in the run, the third arm posts a frame with method byte 0x9e (Quantized), which is not in CompressionMethodByte here, so CompressionCodecFactory::get throws UNKNOWN_CODEC and the arm prints 0 where the reference expects 1. The CI database truncates the captured output, so that failure is easy to miss; fixing only the setting would have left this PR red.

I ported the test rather than dropping it, in two edits I can show are faithful.

Dropping packed_skip_index_max_bytes = 0 is not a weakening, because 0 is 26.3's only behaviour. SettingsChangesHistory describes 0 as "restore the previous behavior (no packing)", and 26.3 predates the feature altogether: there is no *Packed* file in its src/Storages/MergeTree/. A skip-index substream therefore always gets its own file with its own checksum entry, which is the property that arm depends on. The pin stays load-bearing on master, where the default would pack the tiny minmax index, so I did not touch it there.

Dropping the Quantized arm is sound because CompressionCodecNone is the only codec reporting isNone() on 26.3: the passthrough shortcut has a single carrier, so that arm exercises nothing on this branch. The two remaining NONE arms still cover both directions of the size comparison.

What I checked, against CI binaries for this branch rather than master:

  • the test as cherry-picked fails on this PR's own binary (4a2e303c, whose tree is identical to bda8b4b5's) with that UNKNOWN_SETTING, and the ported test passes on the same binary back to back, so the two test files are the only difference between the outcomes;
  • the ported test still fails on this PR's parent ea437971: both surviving arms go from 1 to 0 while all four engine-control lines match byte for byte, so the oracle still catches the bug it exists for and the setting removal did not weaken it;
  • 50 randomized runs of the ported test on the fixed binary, all green;
  • the diff is two test files, +6 / -11, nothing under src/, and src/Compression/CompressedReadBufferBase.cpp is unchanged;
  • the commit is a direct child of bda8b4b5, so applying it is a fast forward.

If you would rather 26.3 took the fix without this test, say so and I will not pursue the port.

git fetch https://github.com/groeneai/ClickHouse resolve-26.3-backport-114344
git push origin FETCH_HEAD:backport/26.3/114344

I hold triage and not push on this repository, so applying it needs one of you.

@rienath
rienath merged commit 65d9abe into 26.3 Sep 25, 2026
36 checks passed
@rienath
rienath deleted the backport/26.3/114344 branch September 25, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants