Skip to content

tempdir: Deduplicate storage paths before cleaning

Will Chandler (ex-GitLab) requested to merge wc/dedup-temp-cleaner into master

Currently we run the tempdir against every storage configured for Gitaly. However, some installations may list every storage present in rails in the Gitaly config, using the same path for all of them. This allows admins to share a Gitaly config across all Gitaly servers, but means that we cannot assume that each storage configured is unique.

To cut down on duplicate cleaning runs, let's deduplicate the configured storages by path. This will have a relatively small performance impact, as the first cleaning run against a path will have done all the work, but it will cut down on duplicate entries that clutter Gitaly's logs during startup.

Merge request reports