[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 15/27] cr-ensure-disk-space: Take the flights db lock



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.Jackson@xxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.