Merge lp:~wgrant/launchpad/bug-590708-getBuildsByArchIds-timeout into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Graham Binns on 2010-08-10 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 11318 | ||||
| Proposed branch: | lp:~wgrant/launchpad/bug-590708-getBuildsByArchIds-timeout | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
151 lines (+20/-21) 6 files modified
lib/lp/registry/model/distribution.py (+1/-1) lib/lp/registry/model/distroseries.py (+1/-1) lib/lp/soyuz/doc/binarypackagebuild.txt (+9/-9) lib/lp/soyuz/interfaces/binarypackagebuild.py (+2/-1) lib/lp/soyuz/model/binarypackagebuild.py (+5/-8) lib/lp/soyuz/model/distroarchseries.py (+2/-1) |
||||
| To merge this branch: | bzr merge lp:~wgrant/launchpad/bug-590708-getBuildsByArchIds-timeout | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Julian Edwards (community) | release-critical | 2010-08-10 | Approve on 2010-08-10 |
| Graham Binns (community) | code | 2010-08-10 | Approve on 2010-08-10 |
|
Review via email:
|
|||
Commit Message
Massively speed up the getBuildsByArchIds query, preventing getBuildRecords timeouts.
Description of the Change
This branch fixes getBuildRecords API timeouts (bug #590708) by working around a really bad query plan.
In the current code, the query produced by getBuildsByArchIds takes roughly 6 seconds to run (see the last analysis on http://
Rather than taking that route, however, I opted to use a solution employed frequently elsewhere in Soyuz: precalculating the archive IDs from the distribution, and passing them into the query directly. This takes it down to ~280ms on staging, and ~170ms on production (http://

I'm really happy to see another timeout nailed.