r92768 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92767‎ | r92768 | r92769 >
Date:18:50, 21 July 2011
Author:awjrichards
Status:ok
Tags:
Comment:
MFT r92767, switching db reads from slave -> master for concurrency issues
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/CentralNotice (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CentralNotice/CentralNotice.db.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CentralNotice/CentralNotice.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CentralNotice/CentralNotice.sql (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialBannerController.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialBannerLoader.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNotice.php (modified) (history)

Diff [purge]

Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialBannerController.php
___________________________________________________________________
Modified: svn:mergeinfo
11 Merged /trunk/extensions/CentralNotice/special/SpecialBannerController.php:r92767
Index: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNotice.php
@@ -1255,7 +1255,8 @@
12561256 * Lookup the name of a campaign based on the campaign ID
12571257 */
12581258 public static function getNoticeName( $noticeId ) {
1259 - $dbr = wfGetDB( DB_SLAVE );
 1259+ // Read from the master database to avoid concurrency problems
 1260+ $dbr = wfGetDB( DB_MASTER );
12601261 if ( is_numeric( $noticeId ) ) {
12611262 $row = $dbr->selectRow( 'cn_notices', 'not_name', array( 'not_id' => $noticeId ) );
12621263 if ( $row ) {
Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialBannerLoader.php
___________________________________________________________________
Modified: svn:mergeinfo
12631264 Merged /trunk/extensions/CentralNotice/special/SpecialBannerLoader.php:r92767
Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice/CentralNotice.php
___________________________________________________________________
Modified: svn:mergeinfo
12641265 Merged /trunk/extensions/CentralNotice/CentralNotice.php:r92767
Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice/CentralNotice.sql
___________________________________________________________________
Modified: svn:mergeinfo
12651266 Merged /trunk/extensions/CentralNotice/CentralNotice.sql:r92767
Index: branches/wmf/1.17wmf1/extensions/CentralNotice/CentralNotice.db.php
@@ -128,7 +128,8 @@
129129 static function getCampaignSettings( $campaignName, $detailed = true ) {
130130 global $wgCentralDBname;
131131
132 - $dbr = wfGetDB( DB_SLAVE, array(), $wgCentralDBname );
 132+ // Read from the master database to avoid concurrency problems
 133+ $dbr = wfGetDB( DB_MASTER, array(), $wgCentralDBname );
133134
134135 $campaign = array();
135136
Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice
___________________________________________________________________
Modified: svn:mergeinfo
136137 Merged /trunk/extensions/CentralNotice:r92767

Follow-up revisions

RevisionCommit summaryAuthorDate
r95514MFT r92768 - r95513awjrichards20:44, 25 August 2011
r95515MFT r92768 - r95514awjrichards20:46, 25 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92767fix for concurrency problem with loggingkaldari18:48, 21 July 2011

Status & tagging log