release-22.2: backupccl: incremental schedules always wait on_previous_running #98860
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.
Backport 1/1 commits from #98249.
/cc @cockroachdb/release
An incremental backup schedule must always wait if there is a running job
that was previously scheduled by this incremental schedule. This is
because until the previous incremental backup job completes, all future
incremental jobs will attempt to backup data from the same
StartTime
corresponding to the
EndTime
of the last incremental layer. In thiscase only the first incremental job to complete will succeed, while the
remaining jobs will either be rejected or worse corrupt the chain of
backups.
This change overrides the Wait behaviour for an incremental schedule to
always default to
wait
during schedule creation or in an alter statement.Note the user specified value will still be applied to the full backup schedule.
Ideally we'd have a way to configure options for both the full and
incremental schedule separately, in which case we could reject the
on_previous_running
configuration for incremental schedules.Until then this workaround will have to do and we should call out this
known limitation.
Fixes: #96110
Release note (enterprise change): backup schedules created or altered to
have the option
on_previous_running
will have the full backupschedule created with the user specified option, but will override the
incremental backup schedule to always default to
on_previous_running = wait
.This ensures correctness of the backup chains created by the incremental
schedule by preventing duplicate incremental jobs from racing against each
other.
Release justification: low risk, high impact change