r93241 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93240‎ | r93241 | r93242 >
Date:20:19, 26 July 2011
Author:awjrichards
Status:ok
Tags:
Comment:
MFT r93080 - another concurrency fix for CentralNotice
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNotice.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNotice.php
@@ -1267,7 +1267,8 @@
12681268 }
12691269
12701270 static function getNoticeProjects( $noticeName ) {
1271 - $dbr = wfGetDB( DB_SLAVE );
 1271+ // Read from the master database to avoid concurrency problems
 1272+ $dbr = wfGetDB( DB_MASTER );
12721273 $eNoticeName = htmlspecialchars( $noticeName );
12731274 $row = $dbr->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $eNoticeName ) );
12741275 $projects = array();
@@ -1282,7 +1283,8 @@
12831284 }
12841285
12851286 static function getNoticeLanguages( $noticeName ) {
1286 - $dbr = wfGetDB( DB_SLAVE );
 1287+ // Read from the master database to avoid concurrency problems
 1288+ $dbr = wfGetDB( DB_MASTER );
12871289 $eNoticeName = htmlspecialchars( $noticeName );
12881290 $row = $dbr->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $eNoticeName ) );
12891291 $languages = array();
@@ -1297,7 +1299,8 @@
12981300 }
12991301
13001302 static function getNoticeCountries( $noticeName ) {
1301 - $dbr = wfGetDB( DB_SLAVE );
 1303+ // Read from the master database to avoid concurrency problems
 1304+ $dbr = wfGetDB( DB_MASTER );
13021305 $eNoticeName = htmlspecialchars( $noticeName );
13031306 $row = $dbr->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $eNoticeName ) );
13041307 $countries = array();
Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNotice.php
___________________________________________________________________
Added: svn:mergeinfo
13051308 Merged /trunk/phase3/extensions/CentralNotice/special/SpecialCentralNotice.php:r63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,77555,77558-77560,77563-77565,77573
13061309 Merged /branches/wmf-deployment/extensions/CentralNotice/special/SpecialCentralNotice.php:r60970
13071310 Merged /branches/wmf/1.16wmf4/extensions/CentralNotice/special/SpecialCentralNotice.php:r67177,69199,76243,77266
13081311 Merged /trunk/extensions/CentralNotice/special/SpecialCentralNotice.php:r62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73830,73847,73850,73852,73855,73959,73963,73973,73980,73983,73991,73994-73995,74000-74321,74325-74406,75376-75470,75567,75643,75646,75674,75680,75726,75849,75889,75908,75973,76141,76145,76333,76347,76351,76356-76358,76361,76363,76462,76543,76763,77622-79761,79780,79783-80145,80147-80148,80150,80152-80602,81461-83563,83565-91117,91146,91368-92408,92767,93080

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93080more concurrency fixes. These functions are only called when using the Centra...kaldari18:16, 25 July 2011

Status & tagging log