|
@@ 389-393 (lines=5) @@
|
| 386 |
|
} |
| 387 |
|
} |
| 388 |
|
|
| 389 |
|
foreach ( $deleteWheres as $deleteWhere ) { |
| 390 |
|
$this->mDb->delete( $table, $deleteWhere, __METHOD__ ); |
| 391 |
|
$this->mDb->commit( __METHOD__, 'flush' ); |
| 392 |
|
wfGetLBFactory()->waitForReplication( [ 'wiki' => $this->mDb->getWikiID() ] ); |
| 393 |
|
} |
| 394 |
|
|
| 395 |
|
$insertBatches = array_chunk( $insertions, $bSize ); |
| 396 |
|
foreach ( $insertBatches as $insertBatch ) { |
|
@@ 396-400 (lines=5) @@
|
| 393 |
|
} |
| 394 |
|
|
| 395 |
|
$insertBatches = array_chunk( $insertions, $bSize ); |
| 396 |
|
foreach ( $insertBatches as $insertBatch ) { |
| 397 |
|
$this->mDb->insert( $table, $insertBatch, __METHOD__, 'IGNORE' ); |
| 398 |
|
$this->mDb->commit( __METHOD__, 'flush' ); |
| 399 |
|
wfGetLBFactory()->waitForReplication( [ 'wiki' => $this->mDb->getWikiID() ] ); |
| 400 |
|
} |
| 401 |
|
|
| 402 |
|
if ( count( $insertions ) ) { |
| 403 |
|
Hooks::run( 'LinksUpdateAfterInsert', [ $this, $table, $insertions ] ); |