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.
加载中
想要评论请 注册 或 登录