Automatically migrate old merge request diffs to object storage
Once we support storing merge request diffs in object storage https://gitlab.com/gitlab-org/gitlab-ce/issues/52568, we should implement support for automatically migrating old diffs to object storage.
Further details
Retrieving diffs from object storage will likely be slower than from the database. We will learn more in https://gitlab.com/gitlab-org/gitlab-ce/issues/52568. The performance difference means we should probably the latest diff for open merge requests in the database, while moving the rest to object storage.
Proposal
Automatically move the following merge request diffs to object storage:
- all diffs from merge requests that are not the latest version of the merge request
- all diffs from merge requests closed or merged over 7 days ago