Index: trunk/phase3/includes/User.php |
— | — | @@ -1729,12 +1729,18 @@ |
1730 | 1730 | if( $this->mId ) { |
1731 | 1731 | $this->mTouched = self::newTouchedTimestamp(); |
1732 | 1732 | |
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 | + |
1734 | 1738 | $dbw->update( 'user', |
1735 | 1739 | array( 'user_touched' => $dbw->timestamp( $this->mTouched ) ), |
1736 | 1740 | array( 'user_id' => $this->mId ), |
1737 | 1741 | __METHOD__ ); |
1738 | 1742 | |
| 1743 | + $lb->commitMasterChanges(); |
| 1744 | + $lb->closeAll(); |
1739 | 1745 | $this->clearSharedCache(); |
1740 | 1746 | } |
1741 | 1747 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -237,6 +237,7 @@ |
238 | 238 | * (bug 28444) Fix regression: edit-on-doubleclick retains revision id again |
239 | 239 | * (bug 28485) Block::purgeExpired Database returned error "1205: Lock wait timeout |
240 | 240 | exceeded;" |
| 241 | +* (bug 20468) User::invalidateCache throws 1205: Lock wait timeout exceeded |
241 | 242 | |
242 | 243 | === API changes in 1.18 === |
243 | 244 | * (bug 26339) Throw warning when truncating an overlarge API result |