Skip to content

Run housekeeping after moving a repository between shards

Nick Thomas requested to merge (removed):gitaly-2108-repos-gc-after-move into master

What does this MR do?

Run housekeeping after moving a repository between shards

The current inter-shard move is implemented as a git fetch from the original shard to an empty repository on the new shard. The repository on the new shard lacks bitmaps, and may be less well packed, than the repository on the old shard. This has a measurable performance impact.

We may be changing from "FetchInternalRemote" to "ReplicateRepository" in the future, but until then, forcing housekeeping to run is a good performance optimisation - we trade off some short-term I/O load on the new shard for better performance across a wide range of RPCs, including an order-of-magnitude improvement in IsAncestor, which is the find that motivated this change.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Part of gitaly#2108 (closed)

Edited by Nick Thomas

Merge request reports