From 895844e034dc5a746b1b40c0ce514389c40d5120 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 19 Jul 2016 13:02:08 -0700 Subject: [PATCH] Simplify lock release in LinksDeletionUpdate The callback already flushes/commits the transaction. Change-Id: I4875fef1434788ee0c689d9fcae6817863a1ba81 --- includes/deferred/LinksDeletionUpdate.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/deferred/LinksDeletionUpdate.php b/includes/deferred/LinksDeletionUpdate.php index b60ed8ac81..0009781f56 100644 --- a/includes/deferred/LinksDeletionUpdate.php +++ b/includes/deferred/LinksDeletionUpdate.php @@ -179,10 +179,8 @@ class LinksDeletionUpdate extends SqlDataUpdate implements EnqueueableDataUpdate } } - $this->mDb->onTransactionIdle( function() use ( &$scopedLock ) { - // Release the lock *after* the final COMMIT for correctness - ScopedCallback::consume( $scopedLock ); - } ); + // Commit and release the lock + ScopedCallback::consume( $scopedLock ); } private function batchDeleteByPK( $table, array $conds, array $pk, $bSize ) { -- 2.20.1