mirror of https://github.com/schoebel/mars
marsadm: workaround race between create-resource and join-resource
This commit is contained in:
parent
dab34fa2f6
commit
e7edf0020e
|
@ -679,7 +679,12 @@ sub _set_replaylink {
|
|||
$old_primary = $1 if $vers_val =~ m/:.*,log-[0-9]+-([^,]+),/;
|
||||
_fake_versionlink($basedir, $log_nr - 1, $old_primary);
|
||||
} else {
|
||||
my $initial = get_link("$basedir/version-000000001-$primary");
|
||||
my $initial;
|
||||
for (;;) {
|
||||
$initial = get_link("$basedir/version-000000001-$primary", 1);
|
||||
last if $initial;
|
||||
sleep_timeout();
|
||||
}
|
||||
set_link($initial, "$basedir/version-000000001-$host");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue