r49889 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49888‎ | r49889 | r49890 >
Date:01:00, 26 April 2009
Author:aaron
Status:reverted (Comments)
Tags:
Comment:
Tweak for bug 17275: reduce autoreview transaction time by moving hook after RC stuff
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1680,7 +1680,6 @@
16811681 $dbw->rollback();
16821682 } else {
16831683 global $wgUseRCPatrol;
1684 - wfRunHooks( 'NewRevisionFromEditComplete', array($this, $revision, $baseRevId, $user) );
16851684 # Update recentchanges
16861685 if( !( $flags & EDIT_SUPPRESS_RC ) ) {
16871686 # Mark as patrolled if the user can do so
@@ -1695,6 +1694,8 @@
16961695 PatrolLog::record( $rc, true );
16971696 }
16981697 }
 1698+ # Notify extensions of a new edit
 1699+ wfRunHooks( 'NewRevisionFromEditComplete', array(&$this, $revision, $baseRevId, $user) );
16991700 $user->incEditCount();
17001701 $dbw->commit();
17011702 }
@@ -1761,7 +1762,6 @@
17621763 # Update the page record with revision data
17631764 $this->updateRevisionOn( $dbw, $revision, 0 );
17641765
1765 - wfRunHooks( 'NewRevisionFromEditComplete', array($this, $revision, false, $user) );
17661766 # Update recentchanges
17671767 if( !( $flags & EDIT_SUPPRESS_RC ) ) {
17681768 global $wgUseRCPatrol, $wgUseNPPatrol;
@@ -1775,6 +1775,8 @@
17761776 PatrolLog::record( $rc, true );
17771777 }
17781778 }
 1779+ # Notify extensions of a new page edit
 1780+ wfRunHooks( 'NewRevisionFromEditComplete', array(&$this, $revision, false, $user) );
17791781 $user->incEditCount();
17801782 $dbw->commit();
17811783

Follow-up revisions

RevisionCommit summaryAuthorDate
r51269*Reverted r49852 and removed locking reads (bug 17275)...aaron04:30, 1 June 2009
r51920reverted r49889 - breaks patrol mark functions (and a real fix was used anyway)aaron20:08, 15 June 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r49851Tweak for bug 17275: no need to lock other session reads just for consistent ...aaron01:32, 25 April 2009

Comments

#Comment by Tim Starling (talk | contribs)   15:54, 26 May 2009

I'm not sure I understand how this will reduce any transaction times. The hook is still inside the transaction.

#Comment by Aaron Schulz (talk | contribs)   01:34, 27 May 2009

The time between the flaggedrevs table lock and the commit is smaller...unless some implementation detail negates that.

Status & tagging log