Merge ~cjwatson/launchpad:copy-advisory-lock into launchpad:master
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | a154f19200a82d984f5332035991ba81ea50e762 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:copy-advisory-lock |
Merge into: | launchpad:master |
Diff against target: |
202 lines (+96/-6) 3 files modified
lib/lp/services/database/locking.py (+6/-1) lib/lp/soyuz/model/packagecopyjob.py (+42/-4) lib/lp/soyuz/tests/test_packagecopyjob.py (+48/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ioana Lasc (community) | Approve | ||
Review via email: mp+399646@code.launchpad.net |
Commit message
Take an advisory lock when copying packages
Description of the change
Take an advisory lock on the hash of the target archive, source package name, and source package version when copying packages; otherwise it's possible for multiple copies of the same package into different series in the same archive to race with the conflict checker and create conflicting builds.
There are still some possible races (since different sources may produce the same binaries), but they're much less common.
This is similar to https:/
Looks good.