summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-03-21 04:25:56 +0100
committerterry%mozilla.org <>2000-03-21 04:25:56 +0100
commit16ea7e0fe44a8f3ee25e0ca84f4aa15ed62a5d72 (patch)
tree2de16129ce97e27ebc1e298f0e93df3d8d753a19
parent71699f062777186d9de525bb06bcb719c87d8fc1 (diff)
downloadbugzilla-16ea7e0fe44a8f3ee25e0ca84f4aa15ed62a5d72.tar.gz
bugzilla-16ea7e0fe44a8f3ee25e0ca84f4aa15ed62a5d72.tar.xz
Make the syncing process low priority, so that we won't hang up
shadowdb operations.
-rwxr-xr-xsyncshadowdb8
1 files changed, 8 insertions, 0 deletions
diff --git a/syncshadowdb b/syncshadowdb
index b4ba58bd2..e19e30cfc 100755
--- a/syncshadowdb
+++ b/syncshadowdb
@@ -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");