Repository navigation
Backport #104705 to 26.4: Add defer_partition_pruning_after_final setting to gate the 26.3 FINAL pruning regression - #105026
Merged
Merged
Conversation
…etting to gate the 26.3 FINAL pruning regression
robot-clickhouse
force-pushed
the
backport/26.4/104705
branch
from
May 15, 2026 11:50
f4c19fc to
782a369
Compare
Contributor
|
Workflow [BackportPR], commit [e82cf1c] Summary: ✅ |
The backport bot copy-pasted the entire `26.5` block from `master` into the 26.4 cherry-pick of #104705. That block listed ~45 settings that do not exist in the 26.4 binary (e.g. `optimize_trivial_group_by_limit_query`, `paimon_target_snapshot_id`, `predicate_statistics_sample_rate`, ...), so any query carrying `SETTINGS compatibility = '<old>'` walked the changes history and failed with: Code: 115. DB::Exception: Unknown setting 'optimize_trivial_group_by_limit_query': in attempt to set the value of setting 'compatibility' to '24.1'. The only meaningful entry needed for the backport is `defer_partition_pruning_after_final` under the `26.3` block, which the cherry-pick already added; that entry stays. Removing the whole `26.5` block restores parity with the 26.4 baseline. CI report: #105026
fm4v
added a commit
that referenced
this pull request
May 15, 2026
The cherrypick/26.3/104705 branch was initially pointed at master's merge commit 1d2ca79 instead of a clean cherry-pick onto 26.3. It therefore carried ~50 unrelated master commits plus a chaotic SettingsChangesHistory.cpp that contained master's 26.5 and 26.4 settings blocks plus a duplicate 26.3 block — duplicate blocks would have thrown at startup (LOGICAL_ERROR "Detected duplicate version"), and the 26.4/26.5 entries referenced settings that do not exist in the 26.3 binary (e.g. `optimize_trivial_group_by_limit_query`), so any query with `SETTINGS compatibility = '<old>'` failed with `Code: 115. UNKNOWN_SETTING`. This commit moves the tree to a clean cherry-pick of #104705 on top of backport/26.3/104705. Net contents identical to the original PR: src/Core/Settings.cpp | +21 src/Core/SettingsChangesHistory.cpp | +1 src/Processors/QueryPlan/ReadFromMergeTree.cpp | +12 -3 tests/queries/0_stateless/04229_defer_partition_pruning_after_final.{sql,reference} Original PR: #104705 Companion 26.4 CI fixup: #105026
…6.4 block
The 02995_new_settings_history test baseline (`02995_settings_26_3_1.tsv`)
is a v26.3.1 snapshot that does not contain `defer_partition_pruning_after_final`,
so on the 26.4 branch the setting looks newly added. The test then requires
its `system.settings_changes` entry to have `version > 26.3`, but the
cherry-pick had placed it under the `26.3` block, so the test printed:
PLEASE ADD THE NEW SETTING TO SettingsChangesHistory.cpp:
defer_partition_pruning_after_final WAS ADDED
Move the entry to the `26.4` block so the version filter matches. Use
`true, true` since the 26.3 binaries shipped the deferred-pruning behavior
(setting = true) silently — there is no `compatibility`-driven value change
between 26.3 and 26.4. The retroactive note about `compatibility = '26.2'`
is preserved in the description for context.
CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=105026&sha=4cfa08bb2f7a2982a71fd884deaaf1e034d3d5d4&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20distributed%20plan%2C%20parallel%2C%202%2F2%29
…ster
Master has the entry in two places:
- 26.5 block: `true, true` (placeholder, satisfies the new-settings check
on master)
- 26.3 block: `false, true` (the actual semantic change so
`compatibility = '26.2'` reverts to the pre-regression fast path)
The 26.4 backport must do the same with `26.4` in place of `26.5`:
keep the `false, true` entry in the 26.3 block for compatibility
semantics, and add a `true, true` placeholder in the 26.4 block so
that 02995_new_settings_history accepts the newly-introduced name on
this branch.
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
The backport bot copy-pasted the entire `26.5` block from `master` into the 26.4 cherry-pick of ClickHouse#104705. That block listed ~45 settings that do not exist in the 26.4 binary (e.g. `optimize_trivial_group_by_limit_query`, `paimon_target_snapshot_id`, `predicate_statistics_sample_rate`, ...), so any query carrying `SETTINGS compatibility = '<old>'` walked the changes history and failed with: Code: 115. DB::Exception: Unknown setting 'optimize_trivial_group_by_limit_query': in attempt to set the value of setting 'compatibility' to '24.1'. The only meaningful entry needed for the backport is `defer_partition_pruning_after_final` under the `26.3` block, which the cherry-pick already added; that entry stays. Removing the whole `26.5` block restores parity with the 26.4 baseline. CI report: ClickHouse#105026
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
…4705 Backport ClickHouse#104705 to 26.4: Add `defer_partition_pruning_after_final` setting to gate the 26.3 FINAL pruning regression
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 #104705
Cherry-pick pull-request #105025
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
26.4.3.26