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

Backup is marked as CREATED if it is failed while uploading object storage disk metadata #175

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ch_backup/ch_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def backup(
],
)

# Upload operations are async. Should wait until they are all finished.
self._context.backup_layout.wait()
self._context.backup_meta.state = BackupState.CREATED
except (Exception, TerminatingSignal) as e:
logging.critical("Backup failed", exc_info=True)
Expand All @@ -201,9 +203,6 @@ def backup(
if not self._context.config.get("keep_freezed_data_on_failure"):
self._context.ch_ctl.remove_freezed_data()

# Upload operations are asynch. Should wait until they are all finished.
self._context.backup_layout.wait()

return self._context.backup_meta.name, None

# pylint: disable=too-many-arguments,duplicate-code
Expand Down