add a worker that periodically scans for "+deleted" directories within the repository path
Problem to solve
In some (unclear) cases there can be git directories within the repository path that are marked as deleted but won't get removed from disk by the
Add a worker that detect those directories and handle them appropriately.
Three deleted git directories exist in my Gitlab instance:
drwxrwx--- 6 git git 4096 26. Sep 13:37 foo+530+deleted.git drwxrwx--- 6 git git 4096 24. Sep 09:57 foo.wiki+530+deleted.git drwxrwx--- 7 git git 4096 29. Nov 2017 bar+330+deleted.git
Please note that the current date is October 19th.
The associated Gitlab projects with id
530 were successfully removed from the database:
gitlabhq_production=# select count(*) from projects where id = 330 or id = 530; count ------- 0 (1 row)
This leads to a state where the deleted directories within the repository path won't be removed from disk.
What does success look like, and how can we measure that?
Implement a repository scanner that searches for git directories of projects that cannot be found in the database. In such cases provide a means to notify the Gitlab admin or delete those directories silently.