r41089 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41088‎ | r41089 | r41090 >
Date:07:56, 21 September 2008
Author:tstarling
Status:old
Tags:
Comment:
Revert r40752. Causes lock contention on site_stats and other tracking tables, probably also causes bug 15656. See wikitech-l.
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1475,9 +1475,8 @@
14761476 $lastRevision = 0;
14771477 $revisionId = 0;
14781478
1479 - $dbw->begin();
 1479+ $changed = ( strcmp( $text, $oldtext ) != 0 );
14801480
1481 - $changed = ( strcmp( $text, $oldtext ) != 0 );
14821481 if ( $changed ) {
14831482 $this->mGoodAdjustment = (int)$this->isCountable( $text )
14841483 - (int)$this->isCountable( $oldtext );
@@ -1503,6 +1502,7 @@
15041503 'user_text' => $user->getName(),
15051504 ) );
15061505
 1506+ $dbw->begin();
15071507 $revisionId = $revision->insertOn( $dbw );
15081508
15091509 # Update page
@@ -1527,6 +1527,7 @@
15281528 }
15291529 }
15301530 $user->incEditCount();
 1531+ $dbw->commit();
15311532 }
15321533 } else {
15331534 $revision = null;
@@ -1547,7 +1548,6 @@
15481549 Article::onArticleEdit( $this->mTitle, false ); // leave templatelinks for editUpdates()
15491550 # Update links tables, site stats, etc.
15501551 $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, $changed );
1551 - $dbw->commit();
15521552 }
15531553 } else {
15541554 # Create new article

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40752Tweak transaction for bug 13039aaron15:03, 12 September 2008

Status & tagging log