This eliminates the race with cs-bisection-step (and other flight-construction tools which might reuse previous flights, provided that they also do not pass previous flight numbers from hand to hand with the db unlocked).
Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com> Acked-by: Ian Campbell <ian.campb...@citrix.com> --- cr-ensure-disk-space | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space index 8c5a708..138f3f4 100755 --- a/cr-ensure-disk-space +++ b/cr-ensure-disk-space @@ -145,10 +145,13 @@ END return 1; } -for (;;) { - iteration_continue() - or last; -} +db_retry($dbh_tests,[qw(flights)], sub { + @flights = (); + for (;;) { + iteration_continue() + or last; + } +}); printf "ok.\n"; exit 0; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel