"duplicate key value violates unique constraint" when uploading .po

Bug #708385 reported by Damien Elmes
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Jeroen T. Vermeulen

Bug Description

A user downloaded a .po file from launchpad, modified it in poedit, and tried to upload the modified version. When they did, they received the message:

duplicate key value violates unique constraint "tm__potmsgset__language__shared__ubuntu__key"

When I tried with my own account, I received the same error.

Error is visible at https://translations.launchpad.net/anki/trunk/+imports?start=75&batch=75

Any help would be appreciated.

OOPSes: OOPS-1844B978, OOPS-1844O986, OOPS-1844F1134

Related branches

Changed in launchpad:
importance: Undecided → Critical
Curtis Hovey (sinzui)
tags: added: oops
Revision history for this message
Robert Collins (lifeless) wrote :

I can't see an error on that page. Did you get an OOPS ? If so please provide the OOPS.

Changed in launchpad:
status: New → Triaged
Revision history for this message
Damien Elmes (resolve) wrote :

The error is shown when I click the (i) next to failed:

http://i.imgur.com/fihhK.png

Revision history for this message
Damien Elmes (resolve) wrote :

Changing back to new in case you missed my update - if that's not the correct etiquette, please let me know.

Changed in launchpad:
status: Triaged → New
Revision history for this message
Robert Collins (lifeless) wrote :

If its been marked 'incomplete' changing to new is appropriate; otherwise its not necessary.

Changed in launchpad:
status: New → Triaged
Curtis Hovey (sinzui)
tags: added: lp-translations
Ursula Junque (ursinha)
description: updated
Revision history for this message
Dennis Baudys (thecondordb) wrote :

The problem with getting an OOPS-error (Error ID: OOPS-1874B1056) while trying to save a translation in Launchpad's web interface still persists and is extremely annoying. E.g. on this page [1] I cannot save an updated translation for string 1537 in ddtp-ubuntu-main for Maverick.

[1] https://translations.launchpad.net/ddtp-ubuntu/maverick/+pots/ddtp-ubuntu-main/de/+translate?batch=10&show=all&search=Brian+Masney

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

A few more users were running into the problem. It seems POTMsgSet._setTranslation wasn't setting flush orders when clearing a "current" flag on one message to make room for another. So sometimes the two may get flushed in the wrong order, and so violate the unique constraint.

Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Jeroen T. Vermeulen (jtv)
milestone: none → 11.03
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

The fix is currently on its way through EC2 (to run the tests) and hopefully into the codebase.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

I should note by the way that the reports I've been looking at occurred while working in the web UI, not during uploads.

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Revision history for this message
Dennis Baudys (thecondordb) wrote :

Despite the released fix, the problem with getting an OOPS-error (Error ID: OOPS-1885B1615) while trying to save a translation in Launchpad's web interface is still occuring to me [1]. I cannot save an updated translation for string 1537 in ddtp-ubuntu-main for Maverick.

[1] https://translations.launchpad.net/ddtp-ubuntu/maverick/+pots/ddtp-ubuntu-main/de/+translate?batch=10&show=all&search=Brian+Masney

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 708385] Re: "duplicate key value violates unique constraint" when uploading .po

On Tue, Mar 1, 2011 at 5:41 AM, Dennis Baudys <email address hidden> wrote:
> Despite the released fix,

It is fix committed, not fix released. The fix is undergoing qa and
should be deployed soon.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Dennis: thanks for that link! I tried it on the qastaging server, a test server that has the fix on it for testing: https://translations.qastaging.launchpad.net/ddtp-ubuntu/maverick/+pots/ddtp-ubuntu-main/de/+translate?search=Brian+Masney

I was able to change the translation without error.

tags: added: qa-ok
removed: qa-needstesting
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

With that done, we can now roll out the change to the production servers.

Changed in launchpad:
status: Fix Committed → Fix Released
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Yay! The errors have been gone for the past 2 days.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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