Use getBatchSize() instead of direct field access

Change-Id: Ie11dd951b8be4ffe8bc982c6ef64482352e3ca38
This commit is contained in:
Max Semenik 2017-11-07 19:38:00 -08:00 committed by Krinkle
parent f4ac048a9e
commit c211fc1875

View file

@ -48,7 +48,7 @@ class MigratePreferences extends LoggedUpdateMaintenance {
$iterator = new BatchRowIterator( $dbr,
[ 'user_properties', 'user' ],
[ 'up_user', 'up_property' ],
$this->mBatchSize
$this->getBatchSize()
);
$iterator->addConditions( [
'user_id=up_user',
@ -77,7 +77,7 @@ class MigratePreferences extends LoggedUpdateMaintenance {
if ( $userId != $lastRow->user_id ) {
$rows += $this->updateUser( $lastRow, $optionsToUpdate );
if ( $rows >= $this->mBatchSize ) {
if ( $rows >= $this->getBatchSize() ) {
$this->output( " Updated {$rows} rows up to user ID {$lastRow->user_id}\n" );
$lbFactory->waitForReplication( [ 'wiki' => wfWikiID() ] );
$total += $rows;