Merge ~cjwatson/launchpad:branch-scan-race into launchpad:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Colin Watson | ||||
Approved revision: | 1e8a8e4a940a9906137fba431ad8c810dcc6ff52 | ||||
Merge reported by: | Otto Co-Pilot | ||||
Merged at revision: | not available | ||||
Proposed branch: | ~cjwatson/launchpad:branch-scan-race | ||||
Merge into: | launchpad:master | ||||
Diff against target: |
97 lines (+48/-1) 2 files modified
lib/lp/code/xmlrpc/tests/test_codehosting.py (+47/-1) requirements/launchpad.txt (+1/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guruprasad | Approve | ||
Review via email: mp+430166@code.launchpad.net |
Commit message
Fix race between branchChanged requests and branch scan jobs
Description of the change
If a `branchChanged` XML-RPC request happened to run at the same time as a branch scan job for the same branch, then they may race to update the same `Branch` row, causing one to have to roll back its transaction and try again. However, a bug in the `transaction` library meant that the exception raised by the before-commit hook to gather job state was incorrectly ignored, and as a result an `InFailedSqlTra
Upgrade to `transaction=
Dependencies MP: https:/
LGTM 👍