Change-Id: I0233b5a17fc64751514ec6d0701f155a73906873
$this->output( "...checking $this->mBatchSize revisions for IP edits that need copying, " .
"starting with rev_id $blockStart\n" );
$this->output( "...checking $this->mBatchSize revisions for IP edits that need copying, " .
"starting with rev_id $blockStart\n" );
foreach ( $rows as $row ) {
// Double-check to make sure this is an IP, e.g. not maintenance user or imported revision.
if ( IP::isValid( $row->rev_user_text ) ) {
foreach ( $rows as $row ) {
// Double-check to make sure this is an IP, e.g. not maintenance user or imported revision.
if ( IP::isValid( $row->rev_user_text ) ) {
- $dbw->insert(
- 'ip_changes',
- [
- 'ipc_rev_id' => $row->rev_id,
- 'ipc_rev_timestamp' => $row->rev_timestamp,
- 'ipc_hex' => IP::toHex( $row->rev_user_text ),
- ],
- __METHOD__,
- 'IGNORE'
- );
+ $insertRows[] = [
+ 'ipc_rev_id' => $row->rev_id,
+ 'ipc_rev_timestamp' => $row->rev_timestamp,
+ 'ipc_hex' => IP::toHex( $row->rev_user_text ),
+ ];
+ $dbw->insert(
+ 'ip_changes',
+ $insertRows,
+ __METHOD__,
+ 'IGNORE'
+ );
+
$lbFactory->waitForReplication();
usleep( $throttle * 1000 );
}
$lbFactory->waitForReplication();
usleep( $throttle * 1000 );
}