r87118 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87117‎ | r87118 | r87119 >
Date:06:14, 29 April 2011
Author:aaron
Status:ok
Tags:
Comment:
Reverted r85795 since r85776 was broken
Modified paths:
  • /trunk/extensions/FlaggedRevs/dataclasses/FlaggedPageConfig.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/dataclasses/FlaggedPageConfig.php
@@ -185,9 +185,7 @@
186186 */
187187 public static function purgeExpiredConfigurations() {
188188 if ( wfReadOnly() ) return;
189 - # Get a separate master session for this transaction (deadlock avoidance)
190 - $lb = wfGetLBFactory()->newMainLB();
191 - $dbw = $lb->getConnection( DB_MASTER );
 189+ $dbw = wfGetDB( DB_MASTER );
192190 # Find pages with expired configs...
193191 $config = self::getDefaultVisibilitySettings(); // config is to be reset
194192 $encCutoff = $dbw->addQuotes( $dbw->timestamp() );
@@ -235,8 +233,5 @@
236234 FlaggedRevs::HTMLCacheUpdates( $title ); // purge pages that use this page
237235 }
238236 }
239 - # Commit this transaction and close session
240 - $lb->commitMasterChanges();
241 - $lb->closeAll();
242237 }
243238 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85776* (bug 28485) Block::purgeExpired Database returned error "1205: Lock wait ti...reedy00:29, 11 April 2011
r85795Made purgeExpiredConfigurations use a separate session ala r85776aaron16:20, 11 April 2011

Status & tagging log