repository: Remove housekeeping from Cleanup RPC
This MR removes the call to housekeeping from the Cleanup()
RPC. This request is run synchronously when a push is received, creating the risk that a failure here will block users from pushing
their changes.
We have found that the stale files and refs checks run as part of housekeeping may exceed 60 seconds for larger repositories that are hosted on NFS or poorly packed, causing pushes to consistently timeout for some self-managed customers.
Also, move the housekeeping
call in GarbageCollect
to run prior to git gc
being invoked. This should prevent some GC failures by removing stale lockfiles. I don't think this will increase the risk of stale objects/pack/tmp_*
files sticking around from a killed/failed git gc
as the RPC would error out prior to housekeeping in that scenario.
Closes #3581 (closed)