r74340 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74339‎ | r74340 | r74341 >
Date:09:08, 6 October 2010
Author:aaron
Status:ok
Tags:
Comment:
* Added comment about total commit() breakage
* Took RENAMEUSER_CONTRIBLIMIT out of the clouds (this gets bad MUCH sooner)
* Bumped the timeout a little (assuming this helps...sigh)
* Maybe using user ID JOINs to get the name would be better than have using _user_text fields everywhere for things other than IPs (normalization)?
Modified paths:
  • /trunk/extensions/Renameuser/Renameuser.php (modified) (history)
  • /trunk/extensions/Renameuser/Renameuser_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Renameuser/Renameuser_body.php
@@ -455,6 +455,14 @@
456456 __METHOD__
457457 );
458458 }
 459+
 460+ // Increase time limit (like CheckUser); this can take a while...
 461+ if ( $this->tablesJob ) {
 462+ wfSuppressWarnings();
 463+ set_time_limit( 120 );
 464+ wfRestoreWarnings();
 465+ }
 466+
459467 // Construct jobqueue updates...
460468 // FIXME: if a bureaucrat renames a user in error, he/she
461469 // must be careful to wait until the rename finishes before
@@ -531,12 +539,16 @@
532540 $jobRows = 0;
533541 }
534542 }
 543+ // FIXME: this commits per 50 rows, so when this times out
 544+ // (which id does) the DB will be in a half-assed state...
535545 Job::batchInsert( $jobs );
536546 }
537547 $dbw->freeResult( $res );
538548 }
539549
540550 // Commit the transaction
 551+ // FIXME: this line is misleading and nearly totally
 552+ // useless if the jobqueue was used for any of the tables...
541553 $dbw->commit();
542554
543555 // Delete from memcached again to make sure
Index: trunk/extensions/Renameuser/Renameuser.php
@@ -31,7 +31,7 @@
3232 * The maximum number of edits a user can have and still be allowed renaming,
3333 * set it to 0 to disable the limit.
3434 */
35 -define( 'RENAMEUSER_CONTRIBLIMIT', 1000000 );
 35+define( 'RENAMEUSER_CONTRIBLIMIT', 25000 );
3636 define( 'RENAMEUSER_CONTRIBJOB', 5000 );
3737
3838 # Add a new log type

Follow-up revisions

RevisionCommit summaryAuthorDate
r74737* Removed DIY job insertion batching, batchInsert() already handles this (50 ...aaron20:50, 13 October 2010

Status & tagging log