forked from lix-project/hydra
hydra-update-gc-roots: allow cached refs to the build's jobset
Re-executing this search_related on every access turned out to create very problematic performance. If a jobset had a lot of error output stored in the jobset, and there were many hundreds or thousands of active jobs, this could easily cause >1Gbps of network traffic.
This commit is contained in:
parent
22026da4f8
commit
145667cb53
|
@ -39,10 +39,7 @@ sub keepBuild {
|
||||||
|
|
||||||
$build->finished;
|
$build->finished;
|
||||||
|
|
||||||
# After #1093 merges this can become $build->jobset;
|
my ($jobset) = $build->jobset;
|
||||||
# However, with ->jobset being a column on master
|
|
||||||
# it seems DBIX gets a bit confused.
|
|
||||||
my ($jobset) = $build->search_related('jobset')->first;
|
|
||||||
|
|
||||||
print STDERR " keeping ", ($build->finished ? "" : "scheduled "), "build ", $build->id, " (",
|
print STDERR " keeping ", ($build->finished ? "" : "scheduled "), "build ", $build->id, " (",
|
||||||
$jobset->get_column('project'), ":", $jobset->get_column('name'), ":", $build->get_column('job'), "; ",
|
$jobset->get_column('project'), ":", $jobset->get_column('name'), ":", $build->get_column('job'), "; ",
|
||||||
|
|
Loading…
Reference in a new issue