
11/2/2023 · Patrick Steinhardt
What this post added
This post details the rearchitecture of Git object database maintenance in Gitaly to leverage new Git features like geometric repacking (Git v2.32.0) and cruft packs (Git v2.37.0). It explains the inefficiencies of the old strategy (all-into-one repacks, loose objects for grace periods, expensive reachability checks) and how the new strategy addresses these by: 1. Using geometric repacking to merge packfiles without full rewrites, reducing cost and resource usage. 2. Employing cruft packs with `.mtimes` files to store unreachable objects efficiently while retaining per-object grace period tracking, thus avoiding unpacking to loose objects. 3. Enabling more efficient incremental repacks by reducing the need for full reachability checks.