r60962 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60961‎ | r60962 | r60963 >
Date:05:45, 12 January 2010
Author:tstarling
Status:ok
Tags:
Comment:
Reverted r59719 and merged r59718 instead: proper fix for job queue infinite loop bug.
Modified paths:
  • /branches/wmf-deployment (modified) (history)
  • /branches/wmf-deployment/RELEASE-NOTES (modified) (history)
  • /branches/wmf-deployment/includes (modified) (history)
  • /branches/wmf-deployment/includes/BacklinkCache.php (modified) (history)
  • /branches/wmf-deployment/includes/HTMLCacheUpdate.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/includes/BacklinkCache.php
@@ -53,13 +53,13 @@
5454 public function getLinks( $table, $startId = false, $endId = false ) {
5555 wfProfileIn( __METHOD__ );
5656
 57+ $fromField = $this->getPrefix( $table ) . '_from';
5758 if ( $startId || $endId ) {
5859 // Partial range, not cached
5960 wfDebug( __METHOD__.": from DB (uncacheable range)\n" );
6061 $conds = $this->getConditions( $table );
6162 // Use the from field in the condition rather than the joined page_id,
6263 // because databases are stupid and don't necessarily propagate indexes.
63 - $fromField = $this->getPrefix( $table ) . '_from';
6464 if ( $startId ) {
6565 $conds[] = "$fromField >= " . intval( $startId );
6666 }
@@ -71,7 +71,10 @@
7272 array( 'page_namespace', 'page_title', 'page_id'),
7373 $conds,
7474 __METHOD__,
75 - array('STRAIGHT_JOIN') );
 75+ array(
 76+ 'STRAIGHT_JOIN',
 77+ 'ORDER BY' => $fromField
 78+ ) );
7679 $ta = TitleArray::newFromResult( $res );
7780 wfProfileOut( __METHOD__ );
7881 return $ta;
@@ -84,7 +87,10 @@
8588 array( 'page_namespace', 'page_title', 'page_id' ),
8689 $this->getConditions( $table ),
8790 __METHOD__,
88 - array('STRAIGHT_JOIN') );
 91+ array(
 92+ 'STRAIGHT_JOIN',
 93+ 'ORDER BY' => $fromField,
 94+ ) );
8995 $this->fullResultCache[$table] = $res;
9096 }
9197 $ta = TitleArray::newFromResult( $this->fullResultCache[$table] );
@@ -225,6 +231,12 @@
226232 $row = $res->fetchObject();
227233 $end = $row->page_id - 1;
228234 }
 235+
 236+ # Sanity check order
 237+ if ( $start && $end && $start > $end ) {
 238+ throw new MWException( __METHOD__.': Internal error: query result out of order' );
 239+ }
 240+
229241 $batches[] = array( $start, $end );
230242 }
231243 return array( 'numRows' => $numRows, 'batches' => $batches );
Index: branches/wmf-deployment/includes/HTMLCacheUpdate.php
@@ -226,12 +226,6 @@
227227 }
228228
229229 public function run() {
230 - # LIVE PATCH TS -- broken indexes
231 - if ( $this->table == 'categorylinks' ) {
232 - return true;
233 - }
234 - ### END PATCH
235 -
236230 $update = new HTMLCacheUpdate( $this->title, $this->table, $this->start, $this->end );
237231 $update->doUpdate();
238232 return true;
Property changes on: branches/wmf-deployment/includes
___________________________________________________________________
Name: svn:mergeinfo
239233 - /branches/REL1_15/phase3/includes:51646
/branches/wmf-deployment/includes:53381
/trunk/phase3/includes:56213,56215-56216,56218,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57530,57541,57602,57916,58151,58219,58633,58816,60704
240234 + /branches/REL1_15/phase3/includes:51646
/branches/wmf-deployment/includes:53381
/trunk/phase3/includes:56213,56215-56216,56218,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57530,57541,57602,57916,58151,58219,58633,58816,59718,60704
Index: branches/wmf-deployment/RELEASE-NOTES
@@ -550,6 +550,8 @@
551551 * (bug 20524) Hideuser: Show nice error when trying to block hidden user without
552552 hideuser right
553553 * (bug 21026) Fixed file redirects on shared repos on non-English client wikis
 554+* Fixed a bug which in some situations causes the job queue to grow forever,
 555+ due to an infinite loop of job requeues.
554556
555557 == API changes in 1.16 ==
556558
Property changes on: branches/wmf-deployment
___________________________________________________________________
Name: svn:mergeinfo
557559 - /branches/REL1_15/phase3:51646
/trunk/phase3:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
558560 + /branches/REL1_15/phase3:51646
/trunk/phase3:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816,59718

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59718Fix bug in BacklinkCache: the lack of an ORDER BY clause in getLinks(), combi...tstarling01:55, 4 December 2009
r59719Temporary hack to reduce the job queue size. Should be replaced by r59718 onc...tstarling01:58, 4 December 2009

Status & tagging log