From: Aaron Schulz Date: Tue, 12 Feb 2013 00:53:25 +0000 (-0800) Subject: Fixed unmatched begin/commit in SiteStatsUpdate. X-Git-Tag: 1.31.0-rc.0~20713^2 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=dd2de0ed9fb905cb59c6e0ddf17a7461832d7342;p=lhc%2Fweb%2Fwiklou.git Fixed unmatched begin/commit in SiteStatsUpdate. Change-Id: Iaea0334571a283a72d9a070508d6175cd5b8d9bf --- diff --git a/includes/SiteStats.php b/includes/SiteStats.php index 01841b67db..addaddd698 100644 --- a/includes/SiteStats.php +++ b/includes/SiteStats.php @@ -294,8 +294,6 @@ class SiteStatsUpdate implements DeferrableUpdate { $this->doUpdatePendingDeltas(); } else { $dbw = wfGetDB( DB_MASTER ); - // Need a separate transaction because this a global lock - $dbw->begin( __METHOD__ ); $lockKey = wfMemcKey( 'site_stats' ); // prepend wiki ID if ( $rate ) { @@ -316,6 +314,9 @@ class SiteStatsUpdate implements DeferrableUpdate { $this->images += ( $pd['ss_images']['+'] - $pd['ss_images']['-'] ); } + // Need a separate transaction because this a global lock + $dbw->begin( __METHOD__ ); + // Build up an SQL query of deltas and apply them... $updates = ''; $this->appendUpdate( $updates, 'ss_total_views', $this->views );