Skip to content

Move the PCO codec from beta to experimental - #126749

Closed
groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:pco-codec-experimental-tier
Closed

groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:pco-codec-experimental-tier

Conversation

@groeneai

@groeneai groeneai commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #110613

Changelog category (leave one):

  • Experimental Feature

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

The PCO compression codec is moved from the beta to the experimental tier. It is still enabled with the enable_pco_codec setting.

Description

As asked on #110613, PCO now starts in the experimental tier like the other new codecs (SZ3, ZXC, Quantized; ALP also started there before #116337 promoted it). Since #116337 the tier of a gated codec is the declared tier of its enable_<codec>_codec setting, so the change is one word: enable_pco_codec goes from BETA to EXPERIMENTAL. The gate error, system.codecs.tier, system.settings.tier and the allow_feature_tier check all follow from it. The rest of the diff is text that names the tier: the codec docs badge and note (ParserCreateQuery.cpp), the native format spec, the 01222_system_codecs reference row and a test comment. The 26.10 history record keeps its values and now says "experimental"; the default stays false.

Effect: CODEC(PCO) without the setting fails with "is experimental and not meant to be used in production", and on a server with allow_feature_tier = 1 SET enable_pco_codec = 1 is now refused. Existing PCO tables are not affected: decompression does not check the gate.

Validation, A/B on debug builds of the same base: tier Beta -> Experimental in system.codecs and system.settings, the new gate error, and allow_feature_tier = 1 accepting the setting before and refusing it after. A table written with PCO by the old binary is read, re-attached, inserted into and merged by the new one without the setting. 01222_system_codecs fails on the old binary with exactly the PCO row; the codec and tier tests (01222, 04512, 04513, 04616, 04695, 05024, 03257, 03413) pass, and the two changed tests pass 50/50 randomized runs.

PCO is in the 26.10 branch, so this should get v26.10-must-backport after merge. 26.10.1 is not published yet: if this reaches 26.10 first, the 26.10 CHANGELOG.md entry for #110613 ("Added the beta PCO compression codec") should say experimental.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/126749]

New codecs start in the experimental tier (requested on ClickHouse#110613). Only the
tier of `enable_pco_codec` and the text naming it change; every other tier
surface (gate error, `system.codecs`, `allow_feature_tier`) derives from it.
The history record's reason is corrected in place because the setting is new
in 26.10, which this change is meant to reach.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 1 finding) plus my own review (2 nits).

# Sev Finding Verdict Evidence / action
1 ⚠️ The in-progress 26.10 section of CHANGELOG.md still calls PCO beta (CHANGELOG.md:132) DISAGREE Editing it here would make the 26.10 cherry-pick conflict: the 26.10 branch has no 26.10 changelog section, and ci/tools/cherry_pick.py has no special case for CHANGELOG.md. If 26.10.1 ships before the backport, "beta" is correct for it. The other case is noted in the PR description.
2 💡 enableAllExperimentalSettings is a tier consumer DISAGREE getGateSettingNames returns every non-obsolete gate, so it is unchanged

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are terminal per finding.

Session id: cron:clickhouse-review-slot-8:20261019-164000

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. SELECT name, tier FROM system.codecs WHERE name = 'PCO' prints Beta before and Experimental after, every run; 01222_system_codecs with the new reference fails on the old binary with exactly the PCO row.
b Root cause explained? Not a defect, a requested tier change. Since #116337 a gated codec's tier is the declared tier of its enable_<codec>_codec setting, and enable_pco_codec was declared BETA.
c Fix matches root cause? Yes. The tier word of enable_pco_codec is the single source; the gate error, system.codecs, system.settings and allow_feature_tier derive from it. Only tier-naming text is edited besides it.
d Test intent preserved / new tests added? The 01222_system_codecs reference row is the tier oracle; 05024_codec_gate_settings_match_registered_codecs checks setting tier equals codec tier. 04513 statements are unchanged (only its comment named the tier).
e Both directions demonstrated? Yes, on Build-ID-checked debug builds of the same base: 01222 fails before and passes after; tier, gate error text and allow_feature_tier = 1 behavior differ as expected. 50/50 randomized runs of both changed tests pass.
f Fix is general across code paths? All tier consumers were enumerated (gate reason, system.codecs, settings constraints, system.documentation); hand-written tier text updated in the codec docs source, the native format spec and the test comment.
g Fix generalizes across inputs (params/datatypes/wrappers)? N/A for data types (a tier flag, no data path). Checked with allow_feature_tier 0 and 1, and with CODEC(PCO) and CODEC(Delta, PCO).
h Backward compatible? (maintainer-approved exception only) Existing PCO tables are read, re-attached, inserted into and merged by the new binary without the setting. Default stays false. The only change is that allow_feature_tier = 1 now refuses enable_pco_codec, the lifecycle consequence requested on #110613.
i Invariants and contracts preserved? The gate setting name and semantics are unchanged; setting tier equals codec tier (05024), and no experimental setting is on by default (03413).

Session id: cron:clickhouse-impl-slot-4:20261019-162200

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @rschu1ze, could you review this and add the can be tested label so CI runs? Since #116337 a gated codec takes the tier declared on its enable_<codec>_codec setting, so this changes enable_pco_codec from BETA to EXPERIMENTAL and updates the text that names the tier.

@clickhouse-gh

clickhouse-gh Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [8f3ee49]

Summary: ✅


AI Review

Summary

Moves the PCO compression codec from beta to experimental through enable_pco_codec, and updates the documentation and expected system.codecs output. Review of head 8f3ee499853529fa54d334d179fe543a3a0113ee, including prior discussion and the codec/settings consumers, found no actionable issues.

Missing context / blind spots
  • ⚠️ No local build or tests were run. The author reports focused before/after validation; the head's main build and stateless CI jobs have not completed. Their results remain to be confirmed in the CI report.
Final Verdict

Status: ✅ Approve.

@clickhouse-gh clickhouse-gh Bot added the pr-experimental Experimental Feature label Oct 19, 2026
@Algunenano Algunenano added the can be tested Allows running workflows for external contributors label Oct 19, 2026
@clickhouse-gh clickhouse-gh Bot added the comp-codecs Compression/encoding codecs (LZ4/ZSTD/etc.), archive formats (tar/zip/7z), codec selection and IO... label Oct 19, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 8f3ee4998 with master d69762ed1 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

8 translation units recompiled, 21 s compile time in total, 8 of them have a recent master baseline.

Job report

@rienath rienath self-assigned this Oct 20, 2026
@rienath
rienath added this pull request to the merge queue Oct 20, 2026
@rienath
rienath removed this pull request from the merge queue due to a manual request Oct 20, 2026
@rienath

rienath commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Let's wait to see if the author has an opinion

@alexey-milovidov

Copy link
Copy Markdown
Member

This should go to the 26.10 branch. In 26.11, it will likely be promoted to production.

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@groeneai change the base to 26.10.

@groeneai

Copy link
Copy Markdown
Collaborator Author

I can't base a PR of mine on a release branch: a standing rule for this account is that release branches only get changes through the backport automation.

To make it one click, the same commit is on 26.10 in my fork (clean cherry-pick, identical patch; the codec gating code and the touched tests are identical on 26.10, and 26.10 has no stable release yet): https://github.com/ClickHouse/ClickHouse/compare/26.10...groeneai:ClickHouse:pco-codec-experimental-tier-26.10?expand=1

Once a 26.10 PR is open from it, I'll close this one, so master keeps PCO in Beta for the 26.11 promotion.

@alexey-milovidov

Copy link
Copy Markdown
Member

#127019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-codecs Compression/encoding codecs (LZ4/ZSTD/etc.), archive formats (tar/zip/7z), codec selection and IO... pr-experimental Experimental Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants