]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Make the syncing process low priority, so that we won't hang up
authorterry%mozilla.org <>
Tue, 21 Mar 2000 03:25:56 +0000 (03:25 +0000)
committerterry%mozilla.org <>
Tue, 21 Mar 2000 03:25:56 +0000 (03:25 +0000)
shadowdb operations.

syncshadowdb

index b4ba58bd2602736d29f924e18ef9582d72355933..e19e30cfc201b69df123ca74a1d7b76c71bea440 100755 (executable)
@@ -32,6 +32,7 @@ require "defparams.pl";
 
 sub sillyness {
     my $zz;
+    $zz = $::db;
     $zz = $::dbwritesallowed;
 }
 
@@ -188,6 +189,13 @@ if ($syncall) {
 
 Verbose("Looking for commands to execute.");
 $::dbwritesallowed = 1;
+
+# Make us low priority, to not block anyone who is trying to actually use
+# the shadowdb.  Note that this is carefully coded to ignore errors; we want
+# to keep going even on older mysqld's that don't have the
+# SQL_LOW_PRIORITY_UPDATES option.
+$::db->query("SET OPTION SQL_LOW_PRIORITY_UPDATES = 1"); 
+
 while (1) {
     SendSQL("SELECT id, command FROM $shadowtable WHERE reflected = 0 " .
             "ORDER BY id LIMIT 1");