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

Use UNFREEZE TABLE in ClickHouse after backup finished to allow s3 disks unlock and delete remote keys during merge #423

Closed
filimonov opened this issue Apr 8, 2022 · 4 comments
Assignees

Comments

@filimonov
Copy link
Member

We need to be sure we do UNFREEZE to release the files which were freezed.

@filimonov filimonov changed the title Test / add limited support for s3 disks in ClickHouse Test / add limited (?) support for s3 disks in ClickHouse Apr 8, 2022
@Slach
Copy link
Collaborator

Slach commented Apr 8, 2022

could you explain what exactly you mean?

@filimonov
Copy link
Member Author

filimonov commented Apr 8, 2022

I didn't test that (need to be checked) but it looks like that:

If we have s3 disk configured in clickhouse, then freeze command create a 'hardlinks' in shadow dir (both in local FS and in S3) which increment the refcount to the target object.

Even if you remove the file from the local filesystem (or move it to backup subfolder), the 'hardlink' in the virtual filesystem (in s3) stays in place. And it don't allow the data files to be deleted after the part go away (because refcount never goes back to zero).

There is 'unfreeze' command introduced for that (?)

@Slach
Copy link
Collaborator

Slach commented Apr 8, 2022

got it

@Slach Slach self-assigned this Apr 8, 2022
@Slach
Copy link
Collaborator

Slach commented Mar 30, 2023

currently when we setup

clickhouse:
  use_embedded_backup_restore: true

s3 disks should be also supported

@Slach Slach changed the title Test / add limited (?) support for s3 disks in ClickHouse Use UNFREEZE PART for s3 disks in ClickHouse after backup finished Apr 28, 2023
@Slach Slach changed the title Use UNFREEZE PART for s3 disks in ClickHouse after backup finished Use UNFREEZE TABLE in ClickHouse after backup finished to avoid s3 disks unlock May 23, 2023
@Slach Slach changed the title Use UNFREEZE TABLE in ClickHouse after backup finished to avoid s3 disks unlock Use UNFREEZE TABLE in ClickHouse after backup finished to allow s3 disks unlock remote items during delete May 23, 2023
@Slach Slach changed the title Use UNFREEZE TABLE in ClickHouse after backup finished to allow s3 disks unlock remote items during delete Use UNFREEZE TABLE in ClickHouse after backup finished to allow s3 disks unlock and delete remote keys during merge May 23, 2023
@Slach Slach closed this as completed in 0fc09f2 May 24, 2023
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

No branches or pull requests

2 participants