git/housekeeping: Prune stale multi-pack-index locks
We have recently heard of a customer for whom repository housekeeping
stopped working: even though OptimizeRepository()
is running, it
always returns an error when repacking objects.
As it turns out, the root cause of this is that there was a stale multi-pack-index lock that makes Git fail. Amend our housekeeping logic to prune such stale locks so that Gitaly can eventually recover without the help of an administrator.
Closes #5344 (moved).
Edited by Patrick Steinhardt