IntegrityError raised merging people
Bug #595164 reported by
Diogo Matsubara
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Unassigned |
Bug Description
As seen on OOPS-1626B636 an IntegrityError: duplicate key value violates unique constraint "account_
Related branches
lp:~sinzui/launchpad/unique-openid-identifiers-0
- Aaron Bentley (community): Approve
-
Diff: 140 lines (+71/-7)3 files modifiedlib/lp/registry/doc/person-merge.txt (+1/-1)
lib/lp/registry/model/person.py (+10/-5)
lib/lp/registry/tests/test_person.py (+60/-1)
Changed in launchpad-registry: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 10.06 |
Changed in launchpad-registry: | |
assignee: | nobody → Curtis Hovey (sinzui) |
status: | Triaged → In Progress |
Changed in launchpad-registry: | |
status: | In Progress → Fix Committed |
tags: | added: qa-needstesting |
tags: |
added: qa-ok removed: qa-needstesting |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad-registry: | |
status: | Fix Committed → Fix Released |
Changed in launchpad: | |
assignee: | Curtis Hovey (sinzui) → nobody |
To post a comment you must log in.
The user in this case created two profiles in the same day, possibly via two seperate logins from SSO. All 6 errors were cause by him from 3 different logintokens.
The code adds a 'merged-' prefix to the old account to prevent the OpenID identifier from being used. The identifier was unique. we are certain because of the '-' in the prefix, that it is not possible for it to be accicentally generated. The renamed identifier also exceeds the length of the generated identifier.
It is possible that the account identifier was once used, someone merge the account, This user got the same identifier, then tried a merge. This is a legitimate scenario, though I would have expected such an event to be unlikely to happen in 10 years--it happened in 2 weeks.