Remove stale merge request refs
Problem to solve
Every merge request created results in up to two new
refs/merge-request/<id>/merge) being created, and these appear to never be deleted. This results in all these refs being transferred in every push. Even a tiny 1 line change must transfer all this data, making Git very slow.
www-gitlab-comhas 285,000 refs, of which 28% are
- total refs transferred is 25MB uncompressed, and 7MB compressed.
gitlabhas 108,000 refs, of which 46% are
- total refs transferred is 9.3MB uncompressed, and 2.8MB compressed.
Merge request refs should be expired when they have been merged or closed for more than 14 days.
These does not mean the data will be deleted. A
refs/keep-around can be created. These are hidden, and therefore excluded from ref advertisement. They will not be referenced on push/pull and should therefore improve performance.