Merge lp://qastaging/~wgrant/launchpad/bug-1475358-crash-harder into lp://qastaging/launchpad

Proposed by William Grant
Status: Merged
Merged at revision: 18024
Proposed branch: lp://qastaging/~wgrant/launchpad/bug-1475358-crash-harder
Merge into: lp://qastaging/launchpad
Diff against target: 13 lines (+9/-0)
1 file modified
database/schema/patch-2209-77-2.sql (+9/-0)
To merge this branch: bzr merge lp://qastaging/~wgrant/launchpad/bug-1475358-crash-harder
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+293886@code.qastaging.launchpad.net

Commit message

Uniquely index PackageDiff(from_source, to_source).

Description of the change

Uniquely index PackageDiff(from_source, to_source).

Package copies crash reliably on some packages due to duplicated PackageDiff rows (bug #1475358). Since model code assumes there's at most one PackageDiff for each (from_source, to_source) pair, let's enforce that in the DB schema. Copies will now crash during the race, fixable by retrying, instead of corrupting the DB and preventing any further copy attempts.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.