Page MenuHomePhabricator

CentralAuthUser::register(): Duplicate entry for key 'gu_name'
Closed, ResolvedPublic


Same as T106850, but with private info redacted:

Query: INSERT  INTO `globaluser` (gu_name,gu_email,gu_email_authenticated,gu_salt,gu_password,gu_locked,gu_hidden,gu_registration) VALUES ('{username}','{email}',NULL,'','REDACTED','0','','...')
Function: CentralAuthUser::register
Error: 1062 Duplicate entry '...' for key 'gu_name' (

Seeing some duplicate key issues from multiple extensions (see T106849 for example). Not sure if they're all caused by the same underlying issue.

In T106850#1479986, @Anomie wrote:

It looks like the most likely situation here is a double-submission, where both submissions made it through the 'AbortNewAccount' hook before either one got as far as the call to $wgAuth->addUser().
Checking the logs, CentralAuth.log records the account was created at 09:25:39 on mw1254, while the exception you quoted is logged at the same timestamp on mw1099.


Related Gerrit Patches:
mediawiki/extensions/CentralAuth : masterAvoid duplicate key errors in CentralAuthUser::register()

Event Timeline

Legoktm created this task.Aug 9 2015, 10:14 PM
Legoktm raised the priority of this task from to Needs Triage.
Legoktm updated the task description. (Show Details)
Legoktm added subscribers: Legoktm, ori, Anomie.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 9 2015, 10:14 PM
Legoktm claimed this task.Aug 9 2015, 10:23 PM

Change 230470 had a related patch set uploaded (by Legoktm):
Avoid duplicate key errors in CentralAuthUser::register()

Change 230470 merged by jenkins-bot:
Avoid duplicate key errors in CentralAuthUser::register()

Legoktm closed this task as Resolved.Aug 24 2015, 5:57 AM