From: Kevin Israel Date: Fri, 31 Jul 2015 23:03:31 +0000 (-0400) Subject: refreshLinks.php: Don't wait for slaves if nothing found in a chunk X-Git-Tag: 1.31.0-rc.0~10457^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=be49081be6dc92a0254b412f3db519c071a35202;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index f6c721f91a..763d97e00d 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -344,17 +344,15 @@ class RefreshLinks extends Maintenance { $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(); } }