Skip to content

Cherry pick #103384 to 26.3: Make a decision to skip backup of the target RMV table based on snapshot - #104383

Merged
robot-clickhouse merged 6 commits into
backport/26.3/103384from
cherrypick/26.3/103384
May 8, 2026
Merged

robot-clickhouse merged 6 commits into
backport/26.3/103384from
cherrypick/26.3/103384

Conversation

@robot-clickhouse

Copy link
Copy Markdown
Member

Original pull-request #103384

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-pick locally.
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:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

nikitamikhaylov and others added 6 commits April 22, 2026 17:07
`BackupEntriesCollector::shouldBackupTableData` used to rely on
`DatabaseCatalog::getReferentialDependents` to decide whether a table is
a target of a refreshable materialized view. That lookup is global, so a
table could be marked as an RMV target (and have its data skipped) even
when the RMV itself was not part of the backup.

Build a `TablesDependencyGraph` in `gatherTablesMetadata` over the
tables being backed up (same pattern as `DatabaseReplicated`) and pass
it through `shouldBackupTableData` to
`BackupUtils::isTargetForReplaceRefreshableMaterializedView`, which now
uses the graph's `getDependents` instead of the global catalog.

Made-with: Cursor
Make a decision to skip backup of the target RMV table based on snapshot
@robot-clickhouse robot-clickhouse added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels May 8, 2026
@robot-clickhouse
robot-clickhouse merged commit 572477d into backport/26.3/103384 May 8, 2026
167 of 190 checks passed
@robot-clickhouse
robot-clickhouse deleted the cherrypick/26.3/103384 branch May 8, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants