Skip to content

Prune leftover runtime directories on startup

Sami Hiltunen requested to merge smh-fix-runtime-dir-cleanup into master

Gitaly can leave around stale runtime directories if it fails to run its clean up when terminating. These runtime directories can pile up as there's nothing cleaning them up later. This commit adds a pruning logic where Gitaly will remove runtime directories that belonged to process' that no longer exist. The process that created the runtime directory is identified by the process id suffixed to the directory name. The process is not perfect and can leave some directories uncleaned if another process now has the same pid as the process that created the directory.

Merge request reports