backupccl: reduce chances of a backup locking itself out #81593
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backup manifest resolution and persistence of the
BACKUP-CHECKPOINT
file for future job resumptions now happens in the backup resumer. As
part of this resolution block we do two things:
Check the bucket for existing BACKUP-CHECKPOINT/BACKUP_MANIFEST files
to prevent concurrent backups from writing to the same backup.
Write a BACKUP-CHECKPOINT file after we have resolved all the destinations etc.
for the backup.
After these steps we persist the updated job details that would prevent the resumer
from running 1) and 2) on subsequent resumptions. If the job were to be paused after
2) but before we update the details, a subsequent resumption would cause the job to fail
at 1), essentially locking itself out of the bucket it was backing up to.
This change makes 2) the last step before we persist the job details reducing
the chances of such a scenario.
Fixes: #79270
Release note: None