EmailAddress.email is not UNIQUE

Bug #546696 reported by Stuart Bishop
22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical SSO provider
Fix Released
Medium
Unassigned
Launchpad itself
Fix Released
Critical
Stuart Bishop

Bug Description

lower(EmailAddress.email) should be UNIQUE but for some reason is not.

This makes some Launchpad code explode. I suspect the login service is not checking for duplicates as well as Launchpad did.

We need to clean up the data and rebuild the index as UNIQUE on the live system.

Revision history for this message
Stuart Bishop (stub) wrote :

There are 163 users affected (out of nearly 4 million). None of them have more than one Launchpad account.

visibility: public → private
Revision history for this message
Stuart Bishop (stub) wrote :

Bug #523346 describes the same issue. Perhaps the cleanup didn't clean everything up?

This time a constraint for sure.

Changed in launchpad-foundations:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Stuart Bishop (stub)
Revision history for this message
Stuart Bishop (stub) wrote :

Looks like the SSO is allowing accounts to be created with dupe email addresses. Possibly forgetting to do a case sensitive check.

The column is now UNIQUE (lower(email)) on the master, so bad creations will now generate errors.

Stuart Bishop (stub)
Changed in launchpad-foundations:
status: In Progress → Fix Committed
Revision history for this message
Ursula Junque (ursinha) wrote : Bug fixed by a commit
Changed in launchpad-foundations:
milestone: none → 10.03
tags: added: qa-needstesting
Revision history for this message
Ursula Junque (ursinha) wrote :
Stuart Bishop (stub)
tags: added: qa-ok
removed: qa-needstesting
Stuart Bishop (stub)
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
Changed in canonical-identity-provider:
milestone: none → 2.5.0
Revision history for this message
Anthony Lenton (elachuni) wrote :

Is this constraint still in place? We could probably leverage the index it created instead of using the new index on upper(email).

Changed in canonical-identity-provider:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Anthony Lenton (elachuni) wrote :

Stuart B., what happened to the 163 emails that were in the DB that already had duplicates? Have they been removed or are they still there?

Revision history for this message
Stuart Bishop (stub) wrote :

Duplicate EmailAddress records where removed and the Accounts relinked to the correct Person record. I don't recall having to remove any Account records.

Changed in canonical-identity-provider:
status: Confirmed → Fix Released
Curtis Hovey (sinzui)
visibility: private → public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.