<?php
+
+use MediaWiki\MediaWikiServices;
+
/**
* Maintenance script to wrap all old-style passwords in a layered type
*
$typeCond = 'user_password' . $dbw->buildLike( ":$firstType:", $dbw->anyString() );
$minUserId = 0;
+ $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
do {
$this->beginTransaction( $dbw, __METHOD__ );
__METHOD__,
[
'ORDER BY' => 'user_id',
- 'LIMIT' => $this->mBatchSize,
+ 'LIMIT' => $this->getBatchSize(),
'LOCK IN SHARE MODE',
]
);
}
$this->commitTransaction( $dbw, __METHOD__ );
+ $lbFactory->waitForReplication();
// Clear memcached so old passwords are wiped out
foreach ( $updateUsers as $user ) {