GitLab

Future-proofing Git repository maintenance

Mar 20, 2023Patrick Steinhardt
Future-proofing Git repository maintenance
SummaryAI, from the source post

This post details the revamp of GitLab's repository housekeeping strategy within Gitaly. It explains the limitations of the previous client-driven RPC-based approach, especially for monorepositories, and introduces the new `OptimizeRepository` RPC. This RPC acts as a black-box, analyzing the repository's on-disk state to intelligently perform maintenance tasks like packing objects, pruning objects, packing references, and updating auxiliary data structures. The post also covers the rollout of this new strategy to GitLab.com, highlighting performance improvements and the iterative nature of refining the heuristics.

More from the Git Core Improvements and Contributions trail