Remove transaction when migrating diff commits
The background migration MigrateMergeRequestDiffCommitUsers was wrapping its updates in a transaction. This was a left-over from an early draft of the merge request. As the bulk updates can take some time to complete, this can lead to long transaction timings. On production this ultimately lead to the incident described in issue https://gitlab.com/gitlab-com/gl-infra/production/-/issues/5119, though fortunately this didn't seem to negatively affect users. This commit removes the transaction, and adds a migration to reschedule all the background jobs (which have been removed from the queue). Rescheduling all jobs is the simplest solution to ensuring all data is migrated. Rows that have already been migrated will be updated again, but that's not a problem. Any existing data in merge_request_diff_commit_users will just be reused. See the following for more details: - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63669#note_621297454 - https://gitlab.com/gitlab-com/gl-infra/production/-/issues/5119 - https://gitlab.com/gitlab-org/gitlab/-/issues/331823 Changelog: fixed
Showing
Please register or sign in to comment