Merge lp:~leonardr/launchpad/optimized-length into lp:launchpad/db-devel
| Status: | Merged |
|---|---|
| Merged at revision: | 9678 |
| Proposed branch: | lp:~leonardr/launchpad/optimized-length |
| Merge into: | lp:launchpad/db-devel |
| Diff against target: |
144 lines (+72/-9) 4 files modified
lib/canonical/launchpad/doc/batch_navigation.txt (+28/-2) lib/canonical/launchpad/pagetests/webservice/datamodel.txt (+35/-0) lib/canonical/launchpad/pagetests/webservice/multiversion.txt (+8/-6) versions.cfg (+1/-1) |
| To merge this branch: | bzr merge lp:~leonardr/launchpad/optimized-length |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Māris Fogels (community) | 2010-08-19 | Approve on 2010-08-19 | |
|
Review via email:
|
|||
Description of the Change
The version of lazr.batchnavigator currently integrated into Launchpad causes the web service to raise a Storm exception in a few simple cases. I was able to land the bad version because we didn't test this particular code path--it's tested in lazr.restful, but lazr.restful doesn't use Storm.
This branch tests the code path that fails, and integrates a new version of lazr.batchnavigator into Launchpad to make it stop failing.
Some facts about the new version of lazr.batchnavig
1. I've optimized it to avoid triggering the code that causes the exception. This is good on its own, because even if it worked, that code would be very inefficient.
2. The new version can occasionally tell you the length of a collection without sending out a COUNT query. I added Launchpad tests for this at the SQL-peeking level. Unfortunately, we can't really take advantage of this feature right now--the way I found out about these failures in the first place was while integrating a version of lazr.restful that took advantage of the feature. If I start taking advantage of this feature, the datamodel.txt tests I've added will start failing again.

Hi Leonard,
This looks great! r=mars.
Maris