From a7a5b1538f9308110352911cd30181367ac25606 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Tue, 9 Jul 2013 08:10:28 -0700 Subject: [PATCH] jobd.pl: garbage collect failed forks that are clones It's necessary to run the garbage collector on any forks that are clones and have failed otherwise the files copied into the fork from the parent will accumulate without bound. Assuming the parent has any activity, the pack filenames will change and will just continue to accumulate in the failed clone endlessly. --- jobd/jobd.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/jobd/jobd.pl b/jobd/jobd.pl index 0c2f83d..5ccf46b 100755 --- a/jobd/jobd.pl +++ b/jobd/jobd.pl @@ -40,7 +40,15 @@ sub update_project { return setup_gc($job); } if (-e get_project_path($p).".clone_in_progress") { - job_skip($job, "initial mirroring not complete yet"); + if (-e get_project_path($p).".clone_failed") { + job_skip($job, "initial mirroring failed"); + # Still need to gc non top-level clones even if they've failed + # otherwise the objects copied into them from the parent will + # just accumulate without bound + setup_gc($job) if $p =~ m,/,; + } else { + job_skip($job, "initial mirroring not complete yet"); + } return; } if (my $ts = is_operation_uptodate($p, 'lastrefresh', $Girocco::Config::min_mirror_interval)) { -- 2.11.4.GIT