From: Aaron Schulz Date: Tue, 3 Nov 2015 20:47:05 +0000 (-0800) Subject: Make DeferredUpdates exception handling more robust X-Git-Tag: 1.31.0-rc.0~9090^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=9bb575be70fbd3893fc8bbc9aadc346077239f17;p=lhc%2Fweb%2Fwiklou.git Make DeferredUpdates exception handling more robust Change-Id: Ica2b8dce0978818a2f51684b97c93a3ba845d81a --- diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index 0194a61e0b..8eec202c9d 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -130,11 +130,13 @@ class DeferredUpdates { wfGetLBFactory()->commitMasterChanges(); } catch ( Exception $e ) { // We don't want exceptions thrown during deferred updates to - // be reported to the user since the output is already sent. - // Instead we just log them. + // be reported to the user since the output is already sent if ( !$e instanceof ErrorPageError ) { MWExceptionHandler::logException( $e ); } + // Make sure incomplete transactions are not committed and end any + // open atomic sections so that other DB updates have a chance to run + wfGetLBFactory()->rollbackMasterChanges(); } }