launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02054
[Merge] lp:~jelmer/launchpad/681974-building-commit into lp:launchpad
Jelmer Vernooij has proposed merging lp:~jelmer/launchpad/681974-building-commit into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#681974 build processed with uploadprocessor while it is still set to BUILDING
https://bugs.launchpad.net/bugs/681974
There is a race condition between the buildd manager and the upload processor, which we seem to've hit a couple of times. The buildd manager in some cases moves the file before it commits the change to the job status, causing the upload processor to blow up.
We did originally consider this but did a database flush rather than a commit. This fixes that.
I haven't added any new tests since I couldn't think of a good way to test this. I'm interested in any ideas on how to test this.
--
https://code.launchpad.net/~jelmer/launchpad/681974-building-commit/+merge/42081
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jelmer/launchpad/681974-building-commit into lp:launchpad.
=== modified file 'lib/lp/buildmaster/model/packagebuild.py'
--- lib/lp/buildmaster/model/packagebuild.py 2010-10-28 09:11:36 +0000
+++ lib/lp/buildmaster/model/packagebuild.py 2010-11-29 09:11:29 +0000
@@ -364,9 +364,9 @@
if not os.path.exists(target_dir):
os.mkdir(target_dir)
- # Flush so there are no race conditions with archiveuploader about
+ # Commit so there are no race conditions with archiveuploader about
# self.status.
- Store.of(self).flush()
+ Store.of(self).commit()
# Move the directory used to grab the binaries into
# the incoming directory so the upload processor never