Skip to content

Backport #113574 to 26.9: Fix RESTORE of tables on read-only storage that provides their data (backup_metadata_only) - #127533

Merged
clickhouse-gh[bot] merged 2 commits into
26.9from
backport/26.9/113574
Oct 23, 2026
Merged

clickhouse-gh[bot] merged 2 commits into
26.9from
backport/26.9/113574

Conversation

@robot-ch-test-poll3

@robot-ch-test-poll3 robot-ch-test-poll3 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #113574
Cherry-pick pull-request #127092

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.9.26.13

…e that provides their data (`backup_metadata_only`)
@robot-ch-test-poll3 robot-ch-test-poll3 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Oct 23, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [f50636b]

Summary: ✅

The branch decides `should_backup_data` and leaves the loop at once when it is false, while on master the
partition checks run first, so that naming a partition of a table that cannot back one up is still refused
however the data came to be left out. The cherry-pick put the new `backup_metadata_only` check after that early
exit, where it cannot be reached: leaving the data out is exactly what the flag does, so
`BACKUP ... PARTITIONS` of such a table was accepted and restored as the whole table.

The two checks move above the exit, as on master. `test_backup_restore_s3_plain_backup_metadata_only` and
`test_partitions_of_table_not_created_on_replica` assert the refusal; the first of them also left its table
behind when it failed there, which is what then made `test_backup_restore_with_s3_throttle` restore that table
into a UUID that was still taken.

Co-Authored-By: Claude Opus 5 <[email protected]>
@clickhouse-gh
clickhouse-gh Bot merged commit c286950 into 26.9 Oct 23, 2026
40 of 41 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.9/113574 branch October 23, 2026 22:29
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-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants