Simplify lock release in LinksDeletionUpdate
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 19 Jul 2016 20:02:08 +0000 (13:02 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 19 Jul 2016 20:02:08 +0000 (13:02 -0700)
The callback already flushes/commits the transaction.

Change-Id: I4875fef1434788ee0c689d9fcae6817863a1ba81

includes/deferred/LinksDeletionUpdate.php

index b60ed8a..0009781 100644 (file)
@@ -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 ) {