Merge ~twom/launchpad:oci-try-the-lock-for-the-race into launchpad:master
Proposed by
Tom Wardill
Status: | Merged |
---|---|
Approved by: | Tom Wardill |
Approved revision: | 8ae73843a7eec5938bfafcc5c07a8487ad38bdb9 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~twom/launchpad:oci-try-the-lock-for-the-race |
Merge into: | launchpad:master |
Diff against target: |
371 lines (+113/-144) 3 files modified
lib/lp/oci/model/ocirecipebuildjob.py (+33/-44) lib/lp/oci/tests/test_ocirecipebuildjob.py (+74/-100) lib/lp/services/database/locking.py (+6/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thiago F. Pappacena (community) | Approve | ||
Review via email: mp+400820@code.launchpad.net |
Commit message
Use an AdvisoryLock to prevent simultaneous Registry Upload jobs
Description of the change
The SELECT .. FOR UPDATE mechanism did not prevent a previous job from committing while holding an earlier version of the metadata.
Instead, lock based on the ocirecipe to ensure we only get one at a time.
To post a comment you must log in.
LGTM