Do the LinksUpdateComplete hook updates in a separate
transaction as they may do slow SELECTs and updates.
A large amount of DBPerformance warnings were triggered
by such cases.
Bug: T95501
Change-Id: Ie4e6b7f6aefc21bafba270282c55571ff5385fe0
public function doUpdate() {
Hooks::run( 'LinksUpdate', array( &$this ) );
$this->doIncrementalUpdate();
- Hooks::run( 'LinksUpdateComplete', array( &$this ) );
+
+ $that = $this;
+ $this->mDb->onTransactionIdle( function() use ( $that ) {
+ Hooks::run( 'LinksUpdateComplete', array( &$that ) );
+ } );
}
protected function doIncrementalUpdate() {