Get rid of rename repository in delete calls
At the moment, when a project is deleted it uses the Repositories::DestroyService to delete the repos for that project. This is what it roughly does:
- Checks the existence of the repo and bails out if it doesn't
- Moves the repo from
path.gittopath+deleted.git - Schedules a
Repositories::ShellDestroyServiceto deletepath+delete.gitafter 5min
For Gitaly the move/rename is troublesome to do in an atomic way. But OTOH, Gitaly supports removing repos in an atomic way (since gitaly!4145 (merged)). It basically does what gitlab-rails is doing. So with that we can remove the rename from the Repositories::DestroyService, and let Gitaly itself do the rename/delete dance for us.
Edited by Toon Claes