From 777cf7c2911654566f910df1c5da13e71af98cef Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 9 Apr 2015 11:05:07 -0700 Subject: [PATCH] Switched RevDelList to using start/endAtomic() Change-Id: I2c950b558390e3fd9917414998f576e4e3b0593d --- includes/revisiondelete/RevDelList.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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; } -- 2.20.1