From 911e7acb3114ac471385c92d522ba180f72aaf09 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 22 Aug 2016 16:15:24 -0700 Subject: [PATCH] Run LinksDeletionUpdate after commit() in namespaceDupes.php This DataUpdate (or any for that matter) is not meant to be run in the same transaction as random other stuff. Bug: T143631 Change-Id: Ic40865805c26acc88e613a592b922ffb121962d2 --- maintenance/namespaceDupes.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index 8fd25a6786..d6a9ba81fd 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -596,6 +596,8 @@ class NamespaceConflictChecker extends Maintenance { $this->db->delete( 'page', [ 'page_id' => $id ], __METHOD__ ); + $this->commitTransaction( $this->db, __METHOD__ ); + /* Call LinksDeletionUpdate to delete outgoing links from the old title, * and update category counts. * @@ -605,9 +607,8 @@ class NamespaceConflictChecker extends Maintenance { * accidentally introduce an assumption of title validity to the code we * are calling. */ - $update = new LinksDeletionUpdate( $wikiPage ); - $update->doUpdate(); - $this->commitTransaction( $this->db, __METHOD__ ); + $updates = [ new LinksDeletionUpdate( $wikiPage ) ]; + DataUpdate::runUpdates( $updates ); return true; } -- 2.20.1