From: Aaron Schulz Date: Tue, 17 Nov 2015 04:37:42 +0000 (-0800) Subject: Make JobRunner::commitMasterChanges() check getServerCount() X-Git-Tag: 1.31.0-rc.0~8964^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=bec7753c830d1ab0d3d8b6ae57fcd079510efc87;p=lhc%2Fweb%2Fwiklou.git Make JobRunner::commitMasterChanges() check getServerCount() This is a sanity check to avoid problems in waitForOne() Change-Id: I9792ea8fb69d560bd4adb9bd01515f6456b7e9f3 --- diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php index dd2ef8fd3a..b121dfe57e 100644 --- a/includes/jobqueue/JobRunner.php +++ b/includes/jobqueue/JobRunner.php @@ -451,7 +451,7 @@ class JobRunner implements LoggerAwareInterface { global $wgJobSerialCommitThreshold; $lb = wfGetLB( wfWikiID() ); - if ( $wgJobSerialCommitThreshold !== false ) { + if ( $wgJobSerialCommitThreshold !== false && $lb->getServerCount() > 1 ) { // Generally, there is one master connection to the local DB $dbwSerial = $lb->getAnyOpenConnection( $lb->getWriterIndex() ); } else {