Skip to content

Backport #104822 to 26.3: Fix race between ALTER RENAME COLUMN and merge causing data loss (#80648) - #109336

Merged
alexey-milovidov merged 2 commits into
26.3from
backport/26.3/104822
Jul 5, 2026
Merged

alexey-milovidov merged 2 commits into
26.3from
backport/26.3/104822

Conversation

@robot-ch-test-poll2

@robot-ch-test-poll2 robot-ch-test-poll2 commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #104822
Cherry-pick pull-request #109320

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: 26.3.17.20

@robot-ch-test-poll2 robot-ch-test-poll2 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix labels Jul 3, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [22cca0a]

Summary: ✅

The cherry-pick of #104822 added `MergeTreeData::checkMetadataProperties`,
which calls `checkProperties` with the master signature (6 arguments). On
the `26.3` branch `checkProperties` still takes 7 arguments - it has the
extra `allow_reverse_sorting_key` parameter - so the auto-merged call did
not compile, breaking all builds.

Pass `allow_reverse_key` as the 5th argument, matching the other call sites
in this file (`setProperties`, the projection check, and the ALTER path at
line 4642).

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109336&sha=8ebe24b5e7ec5af647cff53bee965690aa2d3030&name_0=BackportPR

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@alexey-milovidov
alexey-milovidov merged commit 8966a4a into 26.3 Jul 5, 2026
34 checks passed
@alexey-milovidov
alexey-milovidov deleted the backport/26.3/104822 branch July 5, 2026 04:32
bytehalo-infra added a commit to sentioxyz/ClickHouse that referenced this pull request Sep 25, 2026
STOR: RENAME COLUMN racing OPTIMIZE FINAL / background merge (StorageMergeTree) -> data (column replaced by defaults).
Effect in the production build a394e92: its upstream test(s) 04296_alter_rename_column_in_memory_rollback, 04308_alter_rename_column_prepared_mutation_cleanup, 04309_alter_rename_column_post_registration_rollback, 04310_alter_rename_column_settings_rollback fail on it and pass on official 26.8.8.8, run on isolated servers (evidence/fix_ci_20260925/upstream_repro/server_triage_PROD263_vs_UP2688.tsv).
Upstream patch unchanged, with its test(s): 04296_alter_rename_column_in_memory_rollback,04308_alter_rename_column_prepared_mutation_cleanup,04309_alter_rename_column_post_registration_rollback,04310_alter_rename_column_settings_rollback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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