Repository navigation
Cherry pick #113581 to 26.3: Add a "private preview" feature tier between experimental and beta - #117729
Cherry pick #113581 to 26.3: Add a "private preview" feature tier between experimental and beta#117729robot-ch-test-poll4 wants to merge 3 commits into
Conversation
Feature tiers were PRODUCTION, OBSOLETE, EXPERIMENTAL and BETA. This adds a
fourth maturity tier for features on a clear path to general availability whose
applicability is still limited and which are not recommended for production
use, so the tiers are ordered
experimental < private preview < beta < production
and extends allow_feature_tier accordingly. Requested in #113481; the
numbering below was confirmed by the issue author.
allow_feature_tier becomes a four-level gate: 0 allows every tier, 1 excludes
experimental, 2 additionally excludes private preview, and 3 allows production
settings only. Only 2 changes meaning. 0 still grants everything, and 1 still
grants everything except experimental, because the tier it newly admits
contains no setting: this change deliberately moves no existing setting into
the new tier, which is a product decision for the issue author. 3 is new and
carries today's 2 semantics. The single upgrade-visible change is that a
server pinned at allow_feature_tier = 2 gains beta writability; operators
wanting the old behaviour move to 3. The default stays 0, so no default moves.
Flags::TIER was exactly two bits with all four encodings taken, so it is
widened to three (0x0c -> 0x1c). Every pre-existing encoding decodes
identically under the wider mask, which stays disjoint from IMPORTANT, CUSTOM
and HOT_RELOAD. The new tier is appended (= 16) rather than inserted, so no
existing value of the user-visible system.settings.tier enum moves, and 16
fits int8_t as DataTypeEnum8 requires. BaseSettingsHelpers::getTier holds the
only relational comparison on the enum in the tree and is re-keyed to the new
maximum; without that, every private-preview setting would throw
INCORRECT_DATA at decode.
The tier bits are never serialized. Flags::TIER appears once in all of src/,
the only flags ever OR-ed into a serialized word are IMPORTANT and CUSTOM, and
writeChangedBinary writes an empty flags word, so no wire format changes and
no protocol-version guard is needed.
Every other consumer tests one specific tier with == or !=, so a new tier
would otherwise be silently ungated or silently unreported. All of them gain
an explicit branch: the query-settings gate, the MergeTree table-settings gate
and its five callers, both directions of the allow_feature_tier mapping (the
inverse feeds system.server_settings, which would misreport the level
otherwise), the user-visible Enum8 and the documentation generator. Sites
testing OBSOLETE are unchanged, since private preview is correctly treated
like any other live tier.
Documentation is the DECLARE doc string, which the nightly docs job
regenerates, so no .mdx is edited by hand. allow_feature_tier is a server
setting, so SettingsChangesHistory.cpp, which tracks user-level Settings, does
not apply.
Closes #113481
The three-bit `Flags::TIER` mask is the load-bearing part of adding a fourth tier, and nothing in the suite could detect its reversion. With the old two-bit mask, encoding 16 masks to 0 and reads as PRODUCTION, so a private-preview setting would be silently writable at every `allow_feature_tier` level while every test stayed green: the enum reference is built from the enumerators and never calls `getTier`, the per-tier counts are zero under either mask because no setting carries the tier yet, the range check never fires, and the integration test exercises only the pre-existing encodings. `BaseSettingsHelpers::getTier` is a public static taking a raw `UInt64`, so it can be tested directly. The new case asserts that all five encodings round-trip, that the three reachable invalid encodings throw `INCORRECT_DATA`, and that `IMPORTANT`, `CUSTOM` and `HOT_RELOAD` do not disturb the tier read. Reverting the mask fails it at exactly the private-preview assertion while the other four encodings still pass. The per-tier rows added to `03257_setting_tiers` now assert `count() == 0` instead of `count() >= 0`. The latter holds for any count, so it could never fail; the former states the current fact that no setting carries the tier and reddens when one joins it without the reference being updated. Also name the new tier in the `getTier` doc comment, the last place in `src` and `programs` that still enumerated only three tiers.
…-feature-tier Add a "private preview" feature tier between experimental and beta
|
I have opened #117883, which resolves this cherry-pick against It is not a literal cherry-pick. Since #113581 merged, #113156 (on this branch as #117502) removed every tier parameter from One consequence of the re-floor that may not be obvious: it reaches |
|
Dear @nikitamikhaylov, @groeneai, this cherry-pick PR has not been updated for 3d0h13m31s. Please resolve the conflicts to backport #113581, or close this PR if the backport is no longer needed. This PR will be automatically closed after 7 days of inactivity. |
|
Correction to my comment above: #117883 was closed. A direct PR to a release branch is not the way to resolve a cherry-pick. The resolution now lives in #117893, built the way the automation builds it: this branch merged with If you would rather this PR itself stop conflicting, its head can be fast-forwarded to that same commit. The current head I hold |
|
Dear @nikitamikhaylov, @groeneai, this cherry-pick PR has not been updated for 7d0h5m12s. Closing automatically. If you still want to backport #113581, please resolve the conflicts and reopen this PR. |
|
The resolution for this cherry-pick still exists: One thing changed with the close, from reading What does finish it, for whoever holds write: push the resolved head onto this PR's branch, then reopen this PR. The push is a plain fast-forward, With this PR open and clean, I hold |
Original pull-request #113581
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job