Repository navigation
Cherry pick #113581 to 26.5: Add a "private preview" feature tier between experimental and beta - #115261
Closed
robot-ch-test-poll wants to merge 3 commits into
Closed
Cherry pick #113581 to 26.5: Add a "private preview" feature tier between experimental and beta#115261robot-ch-test-poll wants to merge 3 commits into
robot-ch-test-poll 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
Collaborator
|
Measured together with the other two cherry-picks of #113581. The conflicts here are positional |
Contributor
Author
|
Dear @nikitamikhaylov, @groeneai, this cherry-pick PR has not been updated for 3d0h12m6s. 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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