HomePhabricator

Made the prior user existence check in LoginForm use DB_MASTER

Authored by aaron.

Description

Made the prior user existence check in LoginForm use DB_MASTER

  • This helps if multiple account creation attempts were made in a row and the slave selected was lagged (either too much for Chronology Protector or the user did not resend the cookies to link the session).
  • The locking also better handles concurrent attempt to make another account, especially with CentralAuth trying to make external accounts. This assumes that the rate of concurrent account creations with close names is low enough given trx speed to avoid gap locking issues. This will need to be confirmed with low error log rates to be sure.
  • The User::idFromName() method now includes a $flags parameter.

Bug: T104615
Change-Id: I8385526a19efc528a016ad2bbf376b377138966b

Details

Committed
aaronJul 10 2015, 11:45 PM
Parents
rMW49622354b4e5: Localisation updates from https://translatewiki.net.
Branches
Unknown
Tags
Unknown
References
refs/changes/01/224201/1
ChangeId
I8385526a19efc528a016ad2bbf376b377138966b