Skip to content

Backport #109356 to 25.8: Fix data loss when a merge races ALTER RENAME COLUMN on a column without a default expression - #112737

Merged
alexey-milovidov merged 3 commits into
25.8from
backport/25.8/109356
Aug 4, 2026
Merged

alexey-milovidov merged 3 commits into
25.8from
backport/25.8/109356

Conversation

@robot-ch-test-poll

@robot-ch-test-poll robot-ch-test-poll commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #109356
Cherry-pick pull-request #112622

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

  • Merged into: 25.8.29.50

…ME COLUMN on a column without a default expression
@robot-ch-test-poll robot-ch-test-poll added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix labels Jul 31, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [78931cd]

The test `04648_alter_rename_column_no_default_merge_race` added by this
backport enables the `mt_select_parts_to_mutate_no_free_threads` failpoint to
keep the `RENAME` mutation unselected while `OPTIMIZE ... FINAL` merges the
parts. That failpoint was introduced on `master` by an unrelated commit and is
absent on `25.8`, so every run failed with
`Cannot find fail point mt_select_parts_to_mutate_no_free_threads`
(`BAD_ARGUMENTS`).

Register it and force `max_source_part_size` to zero in
`StorageMergeTree::selectPartsToMutate`, exactly as on `master`.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=112737&sha=61baf2b218b7b731eac7c4b9d569a21986d9652e&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan%2C%20distributed%20plan%2C%20parallel%2C%201%2F2%29
PR: #112737
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The two test_async_load_databases failures (test_materialized_views_cascaded_multiple, test_materialized_views_replicated) in Integration tests (amd_tsan, 1/6) are unrelated to this backport (a MergeTree merge/ALTER RENAME COLUMN fix). They are the known 25.8 flakiness tracked by #108914, whose fix is the still-open backport #112013 (backport of #88573). Once that lands on 25.8, merging the release branch here will clear it.

@groeneai, please push #112013 forward so 25.8 picks up the fix.

The real, PR-related failure was 04648_alter_rename_column_no_default_merge_race, which failed with Cannot find fail point mt_select_parts_to_mutate_no_free_threads — that failpoint was added on master by a commit outside this backport. It is now backported in 78931cd0d13.

@alexey-milovidov
alexey-milovidov merged commit ad3d23a into 25.8 Aug 4, 2026
34 checks passed
@alexey-milovidov
alexey-milovidov deleted the backport/25.8/109356 branch August 4, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants