Merge "Avoid scoped lock errors in Category::refreshCounts() due to nesting"
This commit is contained in:
commit
9c8ff2fac0
2 changed files with 9 additions and 2 deletions
|
|
@ -106,7 +106,11 @@ class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate {
|
|||
__METHOD__
|
||||
);
|
||||
if ( $row ) {
|
||||
Category::newFromRow( $row, $title )->refreshCounts();
|
||||
$cat = Category::newFromRow( $row, $title );
|
||||
// T166757: do the update after the main job DB commit
|
||||
DeferredUpdates::addCallableUpdate( function () use ( $cat ) {
|
||||
$cat->refreshCounts();
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3496,7 +3496,10 @@ class WikiPage implements Page, IDBAccessObject {
|
|||
);
|
||||
foreach ( $rows as $row ) {
|
||||
$cat = Category::newFromRow( $row );
|
||||
$cat->refreshCounts();
|
||||
// T166757: do the update after this DB commit
|
||||
DeferredUpdates::addCallableUpdate( function () use ( $cat ) {
|
||||
$cat->refreshCounts();
|
||||
} );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue