From fc662dcb71cfa4cf2d8335441814dc98b9215989 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 7 Oct 2015 11:03:35 -0700 Subject: [PATCH] Convert doBatchPushInternal to use startAtomic/endAtomic This is less likely to cause nesting problems if the main DB is used for the job table (e.g. stock installs) Change-Id: I4c72688bd5d07a6b0626958869e6b386babbc5b3 --- includes/jobqueue/JobQueueDB.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php index d1e4a135bd..7907614b89 100644 --- a/includes/jobqueue/JobQueueDB.php +++ b/includes/jobqueue/JobQueueDB.php @@ -177,7 +177,7 @@ class JobQueueDB extends JobQueue { /** * @see JobQueue::doBatchPush() - * @param array $jobs + * @param IJobSpecification[] $jobs * @param int $flags * @throws DBError|Exception * @return void @@ -198,7 +198,7 @@ class JobQueueDB extends JobQueue { * This function should *not* be called outside of JobQueueDB * * @param IDatabase $dbw - * @param array $jobs + * @param IJobSpecification[] $jobs * @param int $flags * @param string $method * @throws DBError @@ -221,7 +221,7 @@ class JobQueueDB extends JobQueue { } if ( $flags & self::QOS_ATOMIC ) { - $dbw->begin( $method ); // wrap all the job additions in one transaction + $dbw->startAtomic( $method ); // wrap all the job additions in one transaction } try { // Strip out any duplicate jobs that are already in the queue... @@ -256,7 +256,7 @@ class JobQueueDB extends JobQueue { throw $e; } if ( $flags & self::QOS_ATOMIC ) { - $dbw->commit( $method ); + $dbw->endAtomic( $method ); } return; -- 2.20.1