diff --git a/userspace/marsadm b/userspace/marsadm index 71afff7b..734a2d3b 100755 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -3061,9 +3061,10 @@ sub log_purge_res { my $replay = "$basedir/replay-$peer"; my $target = get_link($replay, 1); next unless $target; - $situation{$replay} = $target; lprint "found replay link '$replay' -> '$target'\n"; + # only the logfile number is relevant, not the positions $target =~ s/,.*//; + $situation{$replay} = $target; $start_logs{$target}++; $start_count++; _mark_path_transitive($basedir, $target, $peer); @@ -3127,6 +3128,8 @@ sub log_purge_res { foreach my $replay (sort keys(%situation)) { my $old_situation = $situation{$replay}; my $target = get_link($replay, 1); + # only the logfile number is relevant, not the positions + $target =~ s/,.*//; if (!$target || $target ne $old_situation) { lwarn "Race on '$replay' -> '$target' instead of '$old_situation'\n"; $nr_races++; @@ -3135,6 +3138,7 @@ sub log_purge_res { if ($nr_races) { if ($max_retry-- > 0) { lwarn "Restarting due to $nr_races races\n"; + sleep(1); goto retry; } ldie "Detected $nr_races, the situation is not stable\n";