Last modified: 2014-09-11 18:34:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T20982, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18982 - SUL concurrent user creation
SUL concurrent user creation
Status: RESOLVED DUPLICATE of bug 16020
Product: MediaWiki extensions
Classification: Unclassified
CentralAuth (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-28 09:03 UTC by Darkoneko
Modified: 2014-09-11 18:34 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Darkoneko 2009-05-28 09:03:53 UTC
There seems to be a missing "concurrent" test/protection during automatic account creation (with SUL) when one connects on a new wikimedia wiki.

If one open not one but 2 pages (in a tiny interval, like one second or less) on that wiki, 
-the first one will cause the account to be created (normal behaviour)
-the 2nd one will show an error of the like of :

the following error occurs : 
  richiamata dalla funzione "User::addToDatabase". MySQL ha restituito il seguente errore "1062: Duplicate entry 'Darkoneko' for key 2 (10.0.6.21)".

I assume it's because the 2nd page doesn't detect that the 1st is already running the "account creation" thing.

----
The error message above was copied from napwiki (case happened some minutes ago) ; I also had the same case on another wikimedia wiki (forgot which) yesterday
Comment 1 Happy-melon 2009-05-28 09:49:19 UTC
I expect this is because the relevant functions check a slave DB to see if the user already exists, but creating the new user account if it doesn't involves writing to the DB master.  So instance one checks a slave, sees no account, and writes a new user into the master 'user' table.  Instance two checks a slave, which hasn't yet synced with the master and so *still* shows no account, tries to write the *same* new user into the master 'user' table, and MySQL quite rightly stops that happening.  Presumably you could get the same result with just about any read/write-if-not-found action.  Probably no way to avoid this except by doing the initial read on the DB master as well, which rather defeats the object of having a replicated database in the first place :D
Comment 2 Chad H. 2009-05-29 17:46:01 UTC
Updating product/component.
Comment 3 Kunal Mehta (Legoktm) 2014-09-11 18:34:37 UTC

*** This bug has been marked as a duplicate of bug 16020 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links