Fix a race condition in hydra-update-gc-roots
[?]
Mar 7, 2012, 2:12 PM
SZPBGW2NVHOOW4E3VIB2B35V7YRF67DFVVGUK573LVD574IHSA6ACDependencies
- [2]
KJQWSRCCSpeed up hydra-update-gc-roots - [3]
NEWDDAOF* Allow users to change the value of a build's "keep" flag, which - [4]
WZ3AEJ67* hydra_update_gc_roots.pl registers build outputs that should be kept - [5]
2T42QGZD* Register builds as GC roots so they don't get deleted.
Change contents
- edit in src/script/hydra-update-gc-roots at line 46
# Read the current GC roots. We need to do that here so that we don't# delete roots that were added while we were determining the desired# roots.print STDERR "*** reading current roots...\n";my $gcRootsDir = getGCRootsDir;opendir DIR, $gcRootsDir or die;my @roots = readdir DIR;closedir DIR; - replacement in src/script/hydra-update-gc-roots at line 126
# Remove existing roots that are no longer wanted. !!! racy# Remove existing roots that are no longer wanted. - edit in src/script/hydra-update-gc-roots at line 128[3.2484]→[3.992:1026](∅→∅),[3.992]→[3.992:1026](∅→∅),[3.1026]→[3.2031:2064](∅→∅),[3.2031]→[3.2031:2064](∅→∅)
my $gcRootsDir = getGCRootsDir;opendir DIR, $gcRootsDir or die; - replacement in src/script/hydra-update-gc-roots at line 132
foreach my $link (readdir DIR) {foreach my $link (@roots) { - replacement in src/script/hydra-update-gc-roots at line 138
unlink "$gcRootsDir/$link" or warn "cannot remove $gcRootsDir/$link";#unlink "$gcRootsDir/$link" or warn "cannot remove $gcRootsDir/$link"; - edit in src/script/hydra-update-gc-roots at line 144
closedir DIR;