From: Aaron Schulz Date: Thu, 9 Apr 2015 18:05:07 +0000 (-0700) Subject: Switched RevDelList to using start/endAtomic() X-Git-Tag: 1.31.0-rc.0~11748^2 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=777cf7c2911654566f910df1c5da13e71af98cef;p=lhc%2Fweb%2Fwiklou.git Switched RevDelList to using start/endAtomic() Change-Id: I2c950b558390e3fd9917414998f576e4e3b0593d --- diff --git a/includes/revisiondelete/RevDelList.php b/includes/revisiondelete/RevDelList.php index 840fd77259..f16fd15602 100644 --- a/includes/revisiondelete/RevDelList.php +++ b/includes/revisiondelete/RevDelList.php @@ -92,7 +92,7 @@ abstract class RevDelList extends RevisionListBase { $this->res = false; $dbw = wfGetDB( DB_MASTER ); $this->doQuery( $dbw ); - $dbw->begin( __METHOD__ ); + $dbw->startAtomic( __METHOD__ ); $status = Status::newGood(); $missing = array_flip( $this->ids ); $this->clearFileOps(); @@ -207,10 +207,15 @@ abstract class RevDelList extends RevisionListBase { 'authorIds' => $authorIds, 'authorIPs' => $authorIPs ) ); - $dbw->commit( __METHOD__ ); // Clear caches - $status->merge( $this->doPostCommitUpdates() ); + $that = $this; + $dbw->onTransactionIdle( function() use ( $that ) { + $that->doPostCommitUpdates(); + } ); + + $dbw->endAtomic( __METHOD__ ); + return $status; }