Catrope has submitted this change and it was merged.
Change subject: Adding wfWaitForSlaves before we melt the centralauth cluster.
......................................................................
Adding wfWaitForSlaves before we melt the centralauth cluster.
Also fixing OBO error and resetting the users array between iterations.
Change-Id: Idac8c11142f0e64acf088aa4037d00f6b7eecbbc
---
M maintenance/migratePass0.php
1 file changed, 8 insertions(+), 1 deletion(-)
Approvals:
Catrope: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/maintenance/migratePass0.php b/maintenance/migratePass0.php
index 909130d..e3c7ad3 100644
--- a/maintenance/migratePass0.php
+++ b/maintenance/migratePass0.php
@@ -27,7 +27,7 @@
$lastUser = $dbr->selectField( 'user', 'MAX(user_id)', '', __FUNCTION__
);
for ( $min = 0; $min <= $lastUser; $min += $chunkSize ) {
- $max = $min + $chunkSize;
+ $max = $min + $chunkSize - 1;
$result = $dbr->select( 'user',
array( 'user_id', 'user_name' ),
"user_id BETWEEN $min AND $max",
@@ -39,6 +39,7 @@
}
CentralAuthUser::storeMigrationData( $wgDBname, $users );
+ $users = array(); // clear the array for the next pass
$delta = microtime( true ) - $start;
$rate = ( $delta == 0.0 ) ? 0.0 : $migrated / $delta;
@@ -48,6 +49,12 @@
min( $max, $lastUser ) / $lastUser * 100.0,
$delta,
$rate );
+
+ if ( ( $min + $chunkSize ) % ( $chunkSize * 10 ) == 0 ) {
+ echo "Waiting for slaves to catch up ... ";
+ wfWaitForSlaves( false, 'centralauth' );
+ echo "done\n";
+ }
}
}
--
To view, visit https://gerrit.wikimedia.org/r/54806
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idac8c11142f0e64acf088aa4037d00f6b7eecbbc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Pgehres <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits