Implement online garbage collection
Problem to solve
If you use Docker and CI, you have seen your storage costs balloon over time. But Docker Distribution Registry requires the registry to be set to the read-only mode or shut down completely to run garbage collection. For large organizations that can't afford to shut down their registry for lengthy periods of time, this has resulted in huge storage costs or paying for a service like Docker Trusted Registry.
As GitLab progresses towards v3 of the Container Registry, we have added zero-downtime garbage collection to help solve this problem.
Intended users
User experience goal
GitLab.com and large Self-Managed instances can run garbage collection with v3 of the registry without any downtime required.
Proposal
You can read the full proposal for the design of the new garbage collection algorithm in #199 (closed), but the goal is to leverage the metadata database to enable online GC, without needing to switch the registry to read-only mode.
Documentation
Document the approach in the blueprint for the new Container Registry architecture in gitlab!43754 (merged)