From: Aaron Schulz Date: Tue, 19 Jul 2016 20:02:08 +0000 (-0700) Subject: Simplify lock release in LinksDeletionUpdate X-Git-Tag: 1.31.0-rc.0~6327^2 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=895844e034dc5a746b1b40c0ce514389c40d5120;p=lhc%2Fweb%2Fwiklou.git Simplify lock release in LinksDeletionUpdate The callback already flushes/commits the transaction. Change-Id: I4875fef1434788ee0c689d9fcae6817863a1ba81 --- 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 ) {