Merge lp:~al-maisan/launchpad/unembargo-oops-526645 into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Muharem Hrnjadovic on 2010-03-11 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | not available | ||||
| Proposed branch: | lp:~al-maisan/launchpad/unembargo-oops-526645 | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
145 lines (+64/-46) 2 files modified
lib/lp/soyuz/interfaces/queue.py (+0/-17) lib/lp/soyuz/model/queue.py (+64/-29) |
||||
| To merge this branch: | bzr merge lp:~al-maisan/launchpad/unembargo-oops-526645 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michael Nelson (community) | 2010-03-11 | Approve on 2010-03-11 | |
|
Review via email:
|
|||
Description of the Change
Hello there!
The 4 OOPSs attached to the related bug indicate the optimization with the
highest ROI (see the top 3 queries in the "Repeated SQL Statements" section):
we query the database for *each* binary in order to find out whether it's
already published in the destination archive. That's inefficient and accounts
for 50% percent of the SQL time.
The branch at hand performs the "is the binary published in the destination
archive already?" check in one go.
Tests to run:
bin/test -vv test_uploadproc
No "make lint" issues.
| Michael Nelson (michael.nelson) wrote : | # |
| Muharem Hrnjadovic (al-maisan) wrote : | # |
On 03/11/2010 03:06 PM, Michael Nelson wrote:
> Review: Approve code
>
> Wow! I'm looking forward to seeing how this improves the response time
> for uploads with lots of binaries :)
Hello Michael,
thanks very much for the review! I am quite confident that this change
will have a positive impact :)
> I've only got a few suggestions (extra comments, use of MasterStore,
> possible renaming etc.). I've also attached a diff with the equivalent
> (unformatted) storm version that works too (as I know you don't like
> to work with storm ;) ). Of course, it's up to you whether you use it
> or go with the SQL.
Hrm .. the SQL version has been running on dogfood for a few days now
and I am quite confident that it actually works..
Please see also my in-line responses below as well as the attached
incremental diff.
> Thanks!
> -Michael
>
> On Thu, Mar 11, 2010 at 10:44 AM, Muharem Hrnjadovic
> <email address hidden> wrote:
>> Muharem Hrnjadovic has proposed merging lp:~al-maisan/launchpad/unembargo-oops-526645 into lp:launchpad/devel.
>>
>> Requested reviews:
>> Canonical Launchpad Engineering (launchpad)
>> Related bugs:
>> #526645 cannot unembargo due to LP API timeouts
>> https:/
>>
>>
>> Hello there!
>>
>> The 4 OOPSs attached to the related bug indicate the optimization with the
>> highest ROI (see the top 3 queries in the "Repeated SQL Statements" section):
>> we query the database for *each* binary in order to find out whether it's
>> already published in the destination archive. That's inefficient and accounts
>> for 50% percent of the SQL time.
>>
>> The branch at hand performs the "is the binary published in the destination
>> archive already?" check in one go.
>>
>> Tests to run:
>>
>> bin/test -vv test_uploadproc
>>
>> No "make lint" issues.
>>
>> --
>> https:/
>> Your team Launchpad code reviewers from Canonical is subscribed to branch lp:launchpad/devel.
>>
>> === modified file 'lib/lp/
>> --- lib/lp/
>> +++ lib/lp/
>> @@ -411,23 +411,6 @@
>> title=_("The related build"), required=True, readonly=False,
>> )
>>
>> - def verifyBeforeAcc
>> - """Perform overall checks before accepting a binary upload.
>> -
>> - Ensure each uploaded binary file can be published in the targeted
>> - archive.
>> -
>> - If any of the uploaded binary files are already published a
>> - QueueInconsiste
>> - that cannot be published.
>> -
>> - This check is very similar to the one we do for source upload and
>> - was designed to prevent the creation of binary publications that
>> - will never reach the archive.
>> -
>> - See bug #227184 for further details.
>> - """
>> -
>> def publish(
>> """Publish this queued source in the distroseries referred to by
>> the parent queue item.
>>
>> === modified file 'lib/lp/

Review: Approve code
Wow! I'm looking forward to seeing how this improves the response time
for uploads with lots of binaries :)
I've only got a few suggestions (extra comments, use of MasterStore,
possible renaming etc.). I've also attached a diff with the equivalent
(unformatted) storm version that works too (as I know you don't like
to work with storm ;) ). Of course, it's up to you whether you use it
or go with the SQL.
Thanks!
-Michael
On Thu, Mar 11, 2010 at 10:44 AM, Muharem Hrnjadovic /bugs.launchpad .net/bugs/ 526645 essor /code.launchpad .net/~al- maisan/ launchpad/ unembargo- oops-526645/ +merge/ 21126 soyuz/interface s/queue. py' soyuz/interface s/queue. py 2009-07-19 04:41:14 +0000 soyuz/interface s/queue. py 2010-03-11 09:44:23 +0000 ept(): entStateError is raised containing all filenames logger= None): soyuz/model/ queue.py' soyuz/model/ queue.py 2010-01-10 04:58:44 +0000 soyuz/model/ queue.py 2010-03-11 09:44:23 +0000 ptError, info: ntStateError( info) checkForBinarie sinDestinationA rchive(
<email address hidden> wrote:
> Muharem Hrnjadovic has proposed merging lp:~al-maisan/launchpad/unembargo-oops-526645 into lp:launchpad/devel.
>
> Requested reviews:
> Canonical Launchpad Engineering (launchpad)
> Related bugs:
> #526645 cannot unembargo due to LP API timeouts
> https:/
>
>
> Hello there!
>
> The 4 OOPSs attached to the related bug indicate the optimization with the
> highest ROI (see the top 3 queries in the "Repeated SQL Statements" section):
> we query the database for *each* binary in order to find out whether it's
> already published in the destination archive. That's inefficient and accounts
> for 50% percent of the SQL time.
>
> The branch at hand performs the "is the binary published in the destination
> archive already?" check in one go.
>
> Tests to run:
>
> bin/test -vv test_uploadproc
>
> No "make lint" issues.
>
> --
> https:/
> Your team Launchpad code reviewers from Canonical is subscribed to branch lp:launchpad/devel.
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -411,23 +411,6 @@
> title=_("The related build"), required=True, readonly=False,
> )
>
> - def verifyBeforeAcc
> - """Perform overall checks before accepting a binary upload.
> -
> - Ensure each uploaded binary file can be published in the targeted
> - archive.
> -
> - If any of the uploaded binary files are already published a
> - QueueInconsist
> - that cannot be published.
> -
> - This check is very similar to the one we do for source upload and
> - was designed to prevent the creation of binary publications that
> - will never reach the archive.
> -
> - See bug #227184 for further details.
> - """
> -
> def publish(
> """Publish this queued source in the distroseries referred to by
> the parent queue item.
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -217,9 +217,9 @@
> except QueueSourceAcce
> raise QueueInconsiste
>
> + self._
> + [pub.build for pub in self.builds])
It looks like we should rename self.builds here?
> for build in self.builds:
> - ...