jenkins-bot has submitted this change and it was merged.
Change subject: refreshLinks.php: Don't wait for slaves if nothing found in a
chunk
......................................................................
refreshLinks.php: Don't wait for slaves if nothing found in a chunk
Since 40e300b8273d, the last deletion batch is no longer handled
separately, so the wfWaitForSlaves() call added in 7492e90cc6b9
should no longer be necessary.
Also moved the remaining wfWaitForSlaves() call after the DELETE
query, as is the case in most other maintenance scripts.
Change-Id: I2c3c5ce20f81aed28b4b4c7ecf4eaaca7b9791d1
---
M maintenance/refreshLinks.php
1 file changed, 1 insertion(+), 3 deletions(-)
Approvals:
Aaron Schulz: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index f6c721f..763d97e 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -344,17 +344,15 @@
$numIds = count( $ids );
if ( $numIds ) {
$counter += $numIds;
- wfWaitForSlaves();
$dbw->delete( $table, array( $field =>
$ids ), __METHOD__ );
$this->output( ", $counter" );
$tableStart = $ids[$numIds - 1] + 1;
+ wfWaitForSlaves();
}
} while ( $numIds >= $batchSize && ( $end === null ||
$tableStart <= $end ) );
$this->output( " deleted.\n" );
-
- wfWaitForSlaves();
}
}
--
To view, visit https://gerrit.wikimedia.org/r/228776
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2c3c5ce20f81aed28b4b4c7ecf4eaaca7b9791d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: PleaseStand <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits