Skip to content

Commit

Permalink
Fix CREATED status if it is failed while uploading object storage dis…
Browse files Browse the repository at this point in the history
…k metadata (#175)
  • Loading branch information
aalexfvk authored Jul 25, 2024
1 parent 44b84c2 commit d3b11da
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit d3b11da

Please sign in to comment.