Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add check_replicas_before_attach configuration to avoid concurrent ATTACH PART execution during restore command #474

Closed
Slach opened this issue Jul 14, 2022 · 0 comments · Fixed by #479
Assignees
Milestone

Comments

@Slach
Copy link
Collaborator

Slach commented Jul 14, 2022

to avoid multiple ATTACH PART from concurrent replicas in the same shard to replicated tables

Let’s make an option to ClickHouse backup that would add an extra step.
Before restoring a table run the following query:

select log_pointer + absolute_delay from system.replicas where database=? and table=?

If result is empty or result is zero, then we can restore. Otherwise, table is not empty or is being restored from another replica.

@Slach Slach self-assigned this Jul 14, 2022
@Slach Slach added this to the 1.4.8 milestone Jul 14, 2022
@Slach Slach changed the title add --check-replicas-before-restore-data paramater to restore command add check_replicas_before_restore_data configuration to avoid concurrent ATTACH PART execution during restore command Jul 22, 2022
@Slach Slach changed the title add check_replicas_before_restore_data configuration to avoid concurrent ATTACH PART execution during restore command add check_replicas_before_attach configuration to avoid concurrent ATTACH PART execution during restore command Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant