
3/20/2023 · Patrick Steinhardt
What this post added
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.