Admin tools development/Global rename/Older implementation

Global RenameUser

edit
Goal: Create a tool that is essentially a global version of the pre-existing RenameUser extension, which allows privileged users (stewards on WMF sites) to rename global accounts.
  • Requirements:
  • Design / Architecture:
  • Assume local login, create account, auto create account, rename of old or new name are disabled with hooks
    • If db lock is present for the username
    • If meta's object cache has a rename-key for the user
  • Aquire DB locks for old and new names
  • check localnames, and local `user` tables for attached wikis for new name
  • Check object cache for list of wikis (previous rename failed)
    • Lock and continue if so
    • Otherwise, insert list of wikis into object cache
  • Insert list of wikis into meta's object cache
  • As each db renames the `user` table, update `localuser`, update meta's object cache key <= begin/commit on each?
    • If error is detected (updated rows = 0), then manually roll back. If an error happens during the rollback, quit, and admin will have to try rename again.
  • After all dbs have run, rename globaluser table, add to localnames table
  • For all updated wikis, add a job into the wiki's job queue.


  • Deployment Plan:
  NODES
admin 6
USERS 1