Skip to content

Resolve the 26.3 cherry-pick of #113581: add the private preview feature tier - #117883

Closed
groeneai wants to merge 1 commit into
ClickHouse:26.3from
groeneai:groeneai/resolve-26.3-cherry-pick-113581
Closed

groeneai wants to merge 1 commit into
ClickHouse:26.3from
groeneai:groeneai/resolve-26.3-cherry-pick-113581

Conversation

@groeneai

@groeneai groeneai commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Related: #113581
Related: #117729
Related: #117502
Related: #113481

Ports the fourth feature tier to 26.3, requested by @ nikitamikhaylov via the
v26.2-must-backport label on #113581. The robot cherry-pick #117729 is CONFLICTING.

This is not a literal cherry-pick. #113156 ("Fix allow_feature_tier for MergeTree
settings"), backported to 26.3 as #117502 on 2026-09-01, removed every tier parameter from
MergeTreeSettings::sanityCheck and centralized enforcement into
SettingsConstraints::isAnyTierRestricted and SettingsConstraints::getTierChecker, which
is reached for both ordinary and MergeTree settings. Replaying #113581's diff would restore
code deleted from both branches, so the tier is added at the new enforcement point instead
and six files of #113581 are dropped: five only threaded tier booleans through
sanityCheck (Server.cpp, MergeTreeData.cpp, MergeTreeSettings.{h,cpp},
ProjectionsDescription.cpp), and StorageSystemDocumentation.cpp does not exist here.

26.3 measurably lacks the tier (private_preview appears 0 times in its
SettingsTierType.h, against 2 on master). Flags::TIER widens 0x0c -> 0x1c (bit 0x10
verified free) and the BaseSettingsHelpers::getTier bound moves with it.

As on master, allow_feature_tier = 2 stops meaning "production only" and starts allowing
BETA settings; the new 3 is production-only. @ nikitamikhaylov specified that mapping and
waived compatibility on #113481.

Three deliberate, branch-local differences from master's diff: 26.3 has no BETA-tier
MergeTree setting (master has two), so 03257_setting_tiers.reference keeps this branch's 0
for that row; Flags::HOT_RELOAD does not exist here, so master's neighbour-flag assertion
using it is omitted; and docs/en/operations/system-tables/settings.md gains the tier bullet,
because master generates that page from the StorageSystemSettings.cpp doc string while 26.3
still hand-maintains the list.

Changelog category (leave one):

  • New Feature

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

Added a new private preview feature tier between experimental and beta, so feature tiers are now ordered experimental < private preview < beta < production. The server setting allow_feature_tier gains a level: 0 allows all tiers, 1 excludes experimental, 2 additionally excludes private preview, and 3 allows production settings only. Configurations that previously pinned allow_feature_tier = 2 to allow production settings only must now use 3.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Ports the fourth feature tier (ClickHouse#113581) to the 26.3 LTS branch, requested
by @ nikitamikhaylov via the `v26.2-must-backport` label on that PR. The
robot cherry-pick ClickHouse#117729 cannot carry it: 26.3 was cut long before the
feature merged, so the change lands on drifted context and the PR is
`CONFLICTING`.

This is deliberately not a replay of ClickHouse#113581's diff. Since that PR merged,
"Fix allow_feature_tier for MergeTree settings" (ClickHouse#113156, backported to
26.3 as ClickHouse#117502) removed every tier parameter from
`MergeTreeSettings::sanityCheck` and centralized enforcement into
`SettingsConstraints::isAnyTierRestricted` and
`SettingsConstraints::getTierChecker`, which is reached for both ordinary
and MergeTree settings. Replaying the original diff would restore code
that was deleted from both branches. Instead the tier is expressed in the
architecture 26.3 now has: `getTierChecker` gains a `PRIVATE_PREVIEW`
branch and `isAnyTierRestricted` its third disjunct, and five files of
ClickHouse#113581 that existed only to thread tier booleans through `sanityCheck`
are dropped (`programs/server/Server.cpp`,
`src/Storages/MergeTree/MergeTreeData.cpp`,
`src/Storages/MergeTree/MergeTreeSettings.h`,
`src/Storages/MergeTree/MergeTreeSettings.cpp`,
`src/Storages/ProjectionsDescription.cpp`). A sixth,
`src/Storages/System/StorageSystemDocumentation.cpp`, does not exist on
this branch.

The encoding change is the same as on master: `PRIVATE_PREVIEW` takes
`0b10000`, so `Flags::TIER` widens from `0x0c` to `0x1c` and the
`BaseSettingsHelpers::getTier` range bound moves from `BETA` to
`PRIVATE_PREVIEW`. Bit `0x10` is free on 26.3, whose only other flags are
`IMPORTANT` and `CUSTOM`. Mask and bound move together: widening one
without the other either silently reinterprets encodings 20, 24 and 28 or
is a no-op.

As on master, this changes what `allow_feature_tier = 2` means. It stops
being "production settings only" and starts allowing `BETA` settings; the
new `3` is production-only. @ nikitamikhaylov specified that mapping and
waived compatibility on issue ClickHouse#113481.

Two adaptations are branch-local rather than ported verbatim. 26.3 has no
`BETA`-tier MergeTree setting, where master has two, so
`03257_setting_tiers.reference` keeps this branch's `0` for that row along
with the comment explaining it. And `Flags::HOT_RELOAD` does not exist
here, so master's neighbour-flag assertion using it is omitted from the
new unit test; the `IMPORTANT` and `CUSTOM` assertions remain, and on this
branch those are in fact every other flag bit.

`docs/en/operations/system-tables/settings.md` gains the missing tier
bullet. ClickHouse#113581 touched no documentation because master generates that
page from the `StorageSystemSettings.cpp` doc string inside an
autogenerated region; 26.3 still hand-maintains the value list at the old
docs path, so without this line the server would report five tiers while
its own documentation listed four.

Related: ClickHouse#113581
Related: ClickHouse#117729
Related: ClickHouse#117502
Related: ClickHouse#113481
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-request PR origin: a maintainer pinged or directed groeneai labels Sep 3, 2026
@groeneai

groeneai commented Sep 3, 2026

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 cold
review of the resulting tree.

# Sev Finding Verdict Evidence / action
1 ⚠️ No test changes a PRIVATE_PREVIEW setting, so the new refusal branch could regress while every changed test stays green (SettingsConstraints.cpp:606) DISAGREE True, and identical to the change being backported: zero settings carry the tier here or on master (measured on all three declaration surfaces, with non-zero BETA/EXPERIMENTAL controls), and master's test_allow_feature_tier likewise defines only EXPERIMENTAL_BLOCKED and BETA_BLOCKED. It cannot regress silently either: the first commit to tag such a setting reddens the two count() == 0 assertions this PR adds to 03257_setting_tiers.sql, on both surfaces. Every remedy would exceed the upstream change inside src/ on an LTS branch, since getTierChecker, isAnyTierRestricted and Checker are all private and a unit test would need a visibility change. I verified the branch instead by temporarily tagging one setting per surface: accepted at 0 and 1, refused with PRIVATE PREVIEW at 2 and 3, both tags reverted.

Also ruled on: the added documentation line stays. 26.3 hand-maintains that tier list (no
autogenerated markers, and its generated sibling is untouched), while master's page lists the
tier only because it is generated from the StorageSystemSettings.cpp doc string this port
already edits, so dropping the line would ship a different outcome than the backported change.
Two nits recorded and not acted on, both master-verbatim: the enum is non-monotonic by value,
and isAnyTierRestricted's third disjunct cannot fire on its own. The changelog category
matches #113581's.

Session id: cron:clickhouse-review-slot-48:20260903-121502

@clickhouse-gh

clickhouse-gh Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [3193e9f]

@groeneai

groeneai commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

cc @Algunenano @vitlibar, could you review this? It ports the fourth feature tier (#113581) to 26.3, expressed at the enforcement point this branch has after #117502 (SettingsConstraints::getTierChecker and SettingsConstraints::isAnyTierRestricted) rather than by replaying the original diff's MergeTreeSettings::sanityCheck plumbing, which no longer exists on either branch.

@Algunenano

Copy link
Copy Markdown
Member

@groeneai This is not how you fix a cherry-pick. You fix a cherry-pick by checking out the source branch, merging the target branch and pushing. A direct PR to the branch is not ok.

@groeneai

groeneai commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

Understood, and I have redone it that way: #117893 is cherrypick/26.3/113581 with backport/26.3/113581 merged into it, so master's merge commit of #113581 stays in the history instead of a fresh commit on the release branch. It is mergeable, and merging it lands the cherry-pick branch on backport/26.3/113581, which is where #117729 was headed.

The one step of your recipe I cannot run is the last one: my account has triage on this repo, not push ("push": false, "triage": true), so I cannot push to cherrypick/26.3/113581 itself. #117893 is that same merge commit, served from my fork against the base the robot itself uses. If you would rather have it on the robot's branch, it is a fast-forward:

git fetch https://github.com/groeneai/ClickHouse groeneai/cherrypick-26.3-113581-resolved
git push origin FETCH_HEAD:cherrypick/26.3/113581

I have one other PR in the shape you rejected, #116837, and will redo it the same way.

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 groeneai-origin-request PR origin: a maintainer pinged or directed groeneai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants