obsolete-junk/+series times out when the user is not anonymous
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Edwin Grubbs |
Bug Description
The old oops only showed that some projects have a ton of series, so
batching (Bug 663861) was able to solve the timeouts for anonymous users.
OOPS-1753K2382
The bugtask status query usually takes between 11ms and 40ms when an
anonymous user accesses the page, since the privacy calculation is
simpler.
SELECT status, count(*)
FROM (
SELECT BugTask.status
FROM BugTask
JOIN Bug ON BugTask.bug = Bug.id
WHERE BugTask.
AND Bug.private = FALSE
UNION ALL
SELECT BugTask.status
FROM BugTask
JOIN Bug ON BugTask.bug = Bug.id
JOIN Milestone ON BugTask.milestone = Milestone.id
WHERE BugTask.
AND Milestone.
AND Bug.private = FALSE
) AS subquery
GROUP BY status;
The new oops shows that even if we reduce the batch size from 50 to 10,
the page will still take on average 6 seconds to generate. I will look
into improving the speed of the query, but it may be necessary to either
remove the bugtask counts from this page or not require them to
accurately reflect privacy. To avoid confusion, it could tell the user
that it is only displaying the public bug count.
OOPS-1794A346
The bugtask status query takes between 276ms and 983ms when a normal
user (not Launchpad admin or anonymous) accesses the page, since the
privacy calculation is very complicated.
SELECT status, count(*)
FROM (
SELECT BugTask.status
FROM BugTask
JOIN Bug ON BugTask.bug = Bug.id
WHERE BugTask.
AND (Bug.private = FALSE
OR EXISTS (
))
UNION ALL
SELECT BugTask.status
FROM BugTask
JOIN Bug ON BugTask.bug = Bug.id
JOIN Milestone ON BugTask.milestone = Milestone.id
WHERE BugTask.
AND Milestone.
AND (Bug.private = FALSE
OR EXISTS (
))
) AS subquery
GROUP BY status;
Related branches
- Graham Binns (community): Approve (code)
-
Diff: 200 lines (+125/-9)3 files modifiedlib/lp/bugs/model/bugtask.py (+7/-3)
lib/lp/bugs/tests/test_bugtaskset.py (+91/-0)
lib/lp/testing/factory.py (+27/-6)
Changed in launchpad-registry: | |
milestone: | 10.12 → series-future |
Changed in launchpad: | |
assignee: | Edwin Grubbs (edwin-grubbs) → nobody |
Changed in launchpad: | |
assignee: | nobody → Edwin Grubbs (edwin-grubbs) |
status: | Triaged → In Progress |
Changed in launchpad: | |
milestone: | none → 11.01 |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
+series is just showing bug counts. We do not care about being precise, particularly in the case of obsolete series. Is it possible to only query for public bugs for +series?