File walker deletes empty directories
Part of #2292 (closed)
This change adds a custom recursive file walker.
- Directory entries are traversed before the containing directory. This way we can check if the directory is empty after all possible stale/empty entries are removed.
- An extra call is made to read the directory contents after traversal. This is a simple but less efficient solution that can be optimized if needed.
In order to track directory traversal/deletion, directories will now be counted in the Prometheus metric gitaly_diskcache_walker_check_total
.
Edited by GitLab Release Tools Bot