r86418 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86417‎ | r86418 | r86419 >
Date:17:59, 19 April 2011
Author:platonides
Status:ok (Comments)
Tags:
Comment:
(Bug 28611) Don't die in SqlBagOStuff::incr() if there's a race condition.
Modified paths:
  • /trunk/phase3/includes/objectcache/SqlBagOStuff.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/objectcache/SqlBagOStuff.php
@@ -188,7 +188,12 @@
189189 'keyname' => $key,
190190 'value' => $db->encodeBlob( $this->serialize( $newValue ) ),
191191 'exptime' => $row->exptime
192 - ), __METHOD__ );
 192+ ), __METHOD__, 'IGNORE' );
 193+
 194+ if ( $db->affectedRows() == 0 ) {
 195+ // Race condition. See bug 28611
 196+ $newValue = null;
 197+ }
193198 $db->commit();
194199 } catch ( DBQueryError $e ) {
195200 $this->handleWriteError( $e );

Follow-up revisions

RevisionCommit summaryAuthorDate
r87082MFT r86418 + RELEASE NOTESplatonides15:23, 28 April 2011

Comments

#Comment by 😂 (talk | contribs)   13:57, 27 April 2011

Release-notes?

#Comment by Platonides (talk | contribs)   15:23, 28 April 2011

Added in the r87082 backport.

#Comment by 😂 (talk | contribs)   16:42, 28 April 2011

Got it :)

Status & tagging log