r56712 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56711‎ | r56712 | r56713 >
Date:16:16, 21 September 2009
Author:werdna
Status:ok
Tags:
Comment:
Merge r56711, maintenance fix
Modified paths:
  • /branches/wmf-deployment/maintenance/cleanupTable.inc (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/maintenance/cleanupTable.inc
@@ -87,6 +87,10 @@
8888
8989 protected function runTable( $table, $where, $callback ) {
9090 $dbw = wfGetDB( DB_MASTER );
 91+
 92+ // Unbuffered queries, avoids OOM
 93+ $dbw->bufferResults( false );
 94+
9195 $count = $dbw->selectField( $table, 'count(*)', '', __METHOD__ );
9296 $this->init( $count, $table );
9397 $this->output( "Processing $table..." );
@@ -98,8 +102,12 @@
99103 foreach( $result as $row ) {
100104 call_user_func( $callback, $row );
101105 }
 106+
102107 $this->output( "Finished $table... $this->updated of $this->processed rows updated\n" );
 108+
103109 $result->free();
 110+
 111+ $dbw->bufferResults( true );
104112 }
105113
106114 protected function hexChar( $matches ) {
Property changes on: branches/wmf-deployment/maintenance/cleanupTable.inc
___________________________________________________________________
Name: svn:mergeinfo
107115 + /branches/REL1_15/phase3/maintenance/cleanupTable.inc:51646
/trunk/phase3/maintenance/cleanupTable.inc:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,56711

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r56711Use unbuffered queries in cleanupTable maintenance scripts. Prevents OOM issues.werdna16:15, 21 September 2009

Status & tagging log