]> xenbits.xensource.com Git - osstest.git/commitdiff
standalone: Set very long SQLite3 busy timeout in Perl
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 15 Sep 2015 17:24:17 +0000 (18:24 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 18 Sep 2015 11:37:30 +0000 (12:37 +0100)
Without this, big standalone-generate-dump-flight-runvars jobs may
trying to serialise so much work that SQLite3 times out.  And we are
about to introduce an optimisation which makes this much more likely.

In standalone mode we probably don't care much about this timeout at
all.  (It might even be that the user is using sqlite(3) and has
effectively locked the database interactively for an extended period.)

We would prefer to rely on the user to stop anything that seems to
have become stuck.  So set the timeout to 10ks.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Osstest/JobDB/Standalone.pm

index 45ec9ca47de4a135c176a566b70d7d02986a2b24..431ba5ad2bc634bcfd0de433bfb2bf2c8e78d9e0 100644 (file)
@@ -52,6 +52,9 @@ sub open ($) {
         ShowErrorStatement => 1,
         })
         or die "could not open standalone db $dbi";
+
+    $dbh->sqlite_busy_timeout(10E6); # 10ks
+
     return $dbh;
 }