GitLab Geo keeps a secondary site in sync with a primary. When a file is deleted on the primary, the secondary has to delete its copy too. That sounds simple, until two records share a path, or the path the secondary stored is not quite the path the "is this still in use?" check looks at.
This is the story of gitlab-org/gitlab!265937 , which stopped Geo from treating a perfectly live object-storage file as unused. I'll cover the issue, the plan, the two-path check, a local-path trap that made a one-sided fix dangerous, and the review that tightened the specs.
The issue: a safety check that never matched
The issue was gitlab-org/gitlab#636176 , opened by Chloe Fons. It came out of work to roll out a feature flag, geo_blob_removal_uses_registry_location ( #635220 ).
Some background. On a Geo secondary, each blob registry row stores a blob_path : the file's path relative to its uploader root, or its object storage key.…