73 $config = $services->getMainConfig();
74 $dbProvider = $services->getConnectionProvider();
80 $dbw = $this->
getDB();
82 parent::doIncrementalUpdate();
89 $cat = Category::newFromName( $title->getDBkey() );
90 $cat->refreshCountsIfSmall();
95 $dbw->newDeleteQueryBuilder()
96 ->deleteFrom(
'page_restrictions' )
97 ->where( [
'pr_page' => $id ] )
98 ->caller( __METHOD__ )->execute();
101 $dbw->newDeleteQueryBuilder()
102 ->deleteFrom(
'redirect' )
103 ->where( [
'rd_from' => $id ] )
104 ->caller( __METHOD__ )->execute();
108 $rcIdsForPage = $dbw->newSelectQueryBuilder()
110 ->from(
'recentchanges' )
111 ->where( [ $dbw->expr(
'rc_type',
'!=',
RC_LOG ),
'rc_cur_id' => $id ] )
112 ->caller( __METHOD__ )->fetchFieldValues();
115 $rcIdBatches = array_chunk( $rcIdsForPage, $batchSize );
116 foreach ( $rcIdBatches as $rcIdBatch ) {
117 $dbw->newDeleteQueryBuilder()
118 ->deleteFrom(
'recentchanges' )
119 ->where( [
'rc_id' => $rcIdBatch ] )
120 ->caller( __METHOD__ )->execute();
121 if ( count( $rcIdBatches ) > 1 ) {
122 $dbProvider->commitAndWaitForReplication(
123 __METHOD__, $this->ticket, [
'domain' => $dbw->getDomainID() ]