$this->page->updateCategoryCounts( [], $catBatch, $id );
if ( count( $catBatches ) > 1 ) {
$lbFactory->commitAndWaitForReplication(
- __METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ]
+ __METHOD__, $this->ticket, [ 'domain' => $dbw->getDomainID() ]
);
}
}
- // Refresh the category table entry if it seems to have no pages. Check
- // master for the most up-to-date cat_pages count.
+ // Refresh counts on categories that should be empty now
if ( $title->getNamespace() === NS_CATEGORY ) {
$row = $dbw->selectRow(
'category',
[ 'cat_id', 'cat_title', 'cat_pages', 'cat_subcats', 'cat_files' ],
- [ 'cat_title' => $title->getDBkey(), 'cat_pages <= 0' ],
+ [ 'cat_title' => $title->getDBkey(), 'cat_pages <= 100' ],
__METHOD__
);
if ( $row ) {
$dbw->delete( 'recentchanges', [ 'rc_id' => $rcIdBatch ], __METHOD__ );
if ( count( $rcIdBatches ) > 1 ) {
$lbFactory->commitAndWaitForReplication(
- __METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ]
+ __METHOD__, $this->ticket, [ 'domain' => $dbw->getDomainID() ]
);
}
}
if ( count( $pkDeleteConds ) >= $bSize ) {
$dbw->delete( $table, $dbw->makeList( $pkDeleteConds, LIST_OR ), __METHOD__ );
$lbFactory->commitAndWaitForReplication(
- __METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ]
+ __METHOD__, $this->ticket, [ 'domain' => $dbw->getDomainID() ]
);
$pkDeleteConds = [];
}
public function getAsJobSpecification() {
return [
- 'wiki' => $this->getDB()->getWikiID(),
+ 'wiki' => WikiMap::getWikiIdFromDomain( $this->getDB()->getDomainID() ),
'job' => new JobSpecification(
'deleteLinks',
[ 'pageId' => $this->pageId, 'timestamp' => $this->timestamp ],