Do not finish_replication until the new storage is tracked
What does this MR do and why?
Do not finish_replication until the new storage is tracked
When we move the repository storage we were calling
repository_storage_move.finish_replication!
before we called
track_repository(destination_storage_name)
.
track_repository
is telling the group, project, or snippet to use the
new storage location.
When we call repository_storage_move.finish_replication!
we are
setting the repository to writable again in the state machine event with
storage_move.container.set_repository_writable!
. This means users can
begin pushing again, however, if they push before the new storage is
tracked they will push commits to the old storage and that would then be
untracked once the new storage is tracked causing a loss of information.
The risks of this happening are fairly low as moving storage is a manual task which shouldn't be triggered often and the gap between making the repo writable and tracking the correct storage should be very small.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.