Geo - Geo::RepositoriesCleanUpWorker can leave orphaned entries in the tracking database
Summary
While investigating https://gitlab.com/gitlab-org/gitlab-ee/issues/7109, I found a bug in the Geo::RepositoriesCleanUpWorker#clean_up_repositories method. There is a possibility the project does not have a repository or wiki on disk, but it can have an entry in the project_registry
, e.g., when all attempts to sync the project failed.
Possible fixes
We do this check inside Geo::RepositoryDestroyService#execute
. Otherwise, this can lead to orphaned entries in the project_registry
table. It would be interesting to check if the entries in the other tables in the tracking database, e.g., file_registry
are being removed or not.
/cc @rnienaber