r85783 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85782‎ | r85783 | r85784 >
Date:12:56, 11 April 2011
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
* (bug 20468) User::invalidateCache throws 1205: Lock wait timeout exceeded
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -1729,12 +1729,18 @@
17301730 if( $this->mId ) {
17311731 $this->mTouched = self::newTouchedTimestamp();
17321732
1733 - $dbw = wfGetDB( DB_MASTER );
 1733+ // https://bugzilla.wikimedia.org/show_bug.cgi?id=20468
 1734+ // Create and use a new loadBalancer object, to prevent "1205: Lock wait timeout exceeded;"
 1735+ $lb = wfGetLBFactory()->newMainLB();
 1736+ $dbw = $lb->getConnection( DB_MASTER );
 1737+
17341738 $dbw->update( 'user',
17351739 array( 'user_touched' => $dbw->timestamp( $this->mTouched ) ),
17361740 array( 'user_id' => $this->mId ),
17371741 __METHOD__ );
17381742
 1743+ $lb->commitMasterChanges();
 1744+ $lb->closeAll();
17391745 $this->clearSharedCache();
17401746 }
17411747 }
Index: trunk/phase3/RELEASE-NOTES
@@ -237,6 +237,7 @@
238238 * (bug 28444) Fix regression: edit-on-doubleclick retains revision id again
239239 * (bug 28485) Block::purgeExpired Database returned error "1205: Lock wait timeout
240240 exceeded;"
 241+* (bug 20468) User::invalidateCache throws 1205: Lock wait timeout exceeded
241242
242243 === API changes in 1.18 ===
243244 * (bug 26339) Throw warning when truncating an overlarge API result

Follow-up revisions

RevisionCommit summaryAuthorDate
r85809Revert r85783, it seems to brake random stuff in random places #failreedy18:29, 11 April 2011
r87292* (bug 20468) User::invalidateCache throws 1205: Lock wait timeout exceeded...reedy20:29, 2 May 2011

Comments

#Comment by MaxSem (talk | contribs)   18:23, 11 April 2011

Broke installer because it uses LBFactory_Simple.

#Comment by MaxSem (talk | contribs)   18:24, 11 April 2011

s/LBFactory_Simple/LBFactory_Single/

Status & tagging log