Merge lp:~wgrant/launchpad/bug-761439 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | William Grant |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12938 |
Proposed branch: | lp:~wgrant/launchpad/bug-761439 |
Merge into: | lp:launchpad |
Diff against target: |
90 lines (+47/-0) 2 files modified
lib/lp/soyuz/scripts/processaccepted.py (+9/-0) lib/lp/soyuz/tests/test_processaccepted.py (+38/-0) |
To merge this branch: | bzr merge lp:~wgrant/launchpad/bug-761439 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Kowalik (community) | Approve | ||
Review via email: mp+59317@code.launchpad.net |
Commit message
[r=stevenk][bug=761439] process-accepted now commits after processing each upload.
Description of the change
Bug #761439 is caused by process-accepted not committing after each item is processed: sometimes they create library files that later items need to read, which can't happen before the transaction is committed. This branch changes process-accepted to commit after each upload, even on failure.
It seems unintuitive to commit on failure, but process-accepted makes changes to the on-disk archive. We can't roll back filesystem changes, so we need to commit a potentially partial acceptance to the DB too. The test is a bit awkward: a transaction synchronizer keeps track of the number of commits and ensures that only one item is processed per commit.
I've also added some more logging to process-accepted, to ease identification of the current queue item.
(Note that it already committed on failure anyway, just all in one huge transaction.)