r85814 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85813‎ | r85814 | r85815 >
Date:18:46, 11 April 2011
Author:reedy
Status:ok
Tags:
Comment:
Revert r85785
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -4420,12 +4420,8 @@
44214421 */
44224422 public function updateCategoryCounts( $added, $deleted ) {
44234423 $ns = $this->mTitle->getNamespace();
 4424+ $dbw = wfGetDB( DB_MASTER );
44244425
4425 - // https://bugzilla.wikimedia.org/show_bug.cgi?id=13921
4426 - // Create and use a new loadBalancer object, to prevent "1205: Lock wait timeout exceeded;"
4427 - $lb = wfGetLBFactory()->newMainLB();
4428 - $dbw = $lb->getConnection( DB_MASTER );
4429 -
44304426 # First make sure the rows exist. If one of the "deleted" ones didn't
44314427 # exist, we might legitimately not create it, but it's simpler to just
44324428 # create it and then give it a negative value, since the value is bogus
@@ -4476,9 +4472,6 @@
44774473 __METHOD__
44784474 );
44794475 }
4480 -
4481 - $lb->commitMasterChanges();
4482 - $lb->closeAll();
44834476 }
44844477
44854478 /**
Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -1508,13 +1508,9 @@
15091509 }
15101510
15111511 function doDBDeletes() {
 1512+ $dbw = $this->file->repo->getMasterDB();
15121513 list( $oldRels, $deleteCurrent ) = $this->getOldRels();
15131514
1514 - // https://bugzilla.wikimedia.org/show_bug.cgi?id=13921
1515 - // Create and use a new loadBalancer object, to prevent "1205: Lock wait timeout exceeded;"
1516 - $lb = wfGetLBFactory()->newMainLB();
1517 - $dbw = $lb->getConnection( DB_MASTER );
1518 -
15191515 if ( count( $oldRels ) ) {
15201516 $dbw->delete( 'oldimage',
15211517 array(
@@ -1526,9 +1522,6 @@
15271523 if ( $deleteCurrent ) {
15281524 $dbw->delete( 'image', array( 'img_name' => $this->file->getName() ), __METHOD__ );
15291525 }
1530 -
1531 - $lb->commitMasterChanges();
1532 - $lb->closeAll();
15331526 }
15341527
15351528 /**
Index: trunk/phase3/RELEASE-NOTES
@@ -238,7 +238,6 @@
239239 * (bug 28485) Block::purgeExpired Database returned error "1205: Lock wait timeout
240240 exceeded;"
241241 * (bug 27639) Transaction timeout when trying to OldLocalFile::upgradeRow()
242 -* (bug 13921) deadlocks mass-deleting media files in categories
243242
244243 === API changes in 1.18 ===
245244 * (bug 26339) Throw warning when truncating an overlarge API result

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85785* (bug 13921) deadlocks mass-deleting media files in categoriesreedy13:07, 11 April 2011

Status & tagging log