/participants API timing out

Bug #615237 reported by Robert Collins on 2010-08-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
High
Robert Collins

Bug Description

https://lp-oops.canonical.com/oops.py/?oopsid=1681EB1195

https://api.edge.launchpad.net/beta/%7Eubuntu-dev/participants

SQL time: 7007 ms
Non-sql time: 2065 ms
Total time: 9072 ms
Statement Count: 472

This is suffering from death-by-a-thousand-cuts - every exported field on Person is being separately looked up.

Related branches

Changed in launchpad-registry:
status: New → Triaged
importance: Undecided → High
tags: added: timeout
Changed in launchpad-registry:
assignee: nobody → Robert Collins (lifeless)
Curtis Hovey (sinzui) on 2010-08-10
Changed in launchpad-registry:
status: Triaged → In Progress
milestone: none → 10.09
Ursula Junque (ursinha) on 2010-08-12
Changed in launchpad-registry:
status: In Progress → Fix Committed
Robert Collins (lifeless) wrote :

Removed the qa-needstesting tag - this hasn't landed yet !

tags: removed: qa-needstesting
Changed in launchpad-registry:
status: Fix Committed → In Progress
Robert Collins (lifeless) wrote :

Ok, so a newer fix *has* landed, but a related (possibly key) issue makes it take 6 seconds to count(*) - it will probably be Just Fine on production, but a tweak to the query takes it down to 30ms, so I'm going to go ahead and do that.

Robert Collins (lifeless) wrote :

SELECT COUNT(*) FROM Person JOIN TeamParticipation ON TeamParticipation.person = Person.id LEFT JOIN KarmaTotalCache ON KarmaTotalCache.person = Person.id LEFT JOIN PersonLocation ON PersonLocation.person = Person.id LEFT JOIN Archive ON Archive.owner = Person.id LEFT JOIN EmailAddress ON EmailAddress.person = Person.id LEFT JOIN account on person.account=account.id WHERE TeamParticipation.team = 238131 AND NOT (TeamParticipation.person = 238131) AND (Archive.id IS NULL OR Archive.id = (SELECT MIN(Archive.id) FROM Archive WHERE Archive.owner = Person.id) AND Archive.purpose = 2) AND (EmailAddress.status IS NULL OR (EmailAddress.status = 4 AND (account.status is NULL or account.status=20)));

Robert Collins (lifeless) wrote :

New query tried out on staging (via losa help) - first batch is completely delivered in 3.5seconds to .au, so I'm proposing that to merge.

Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Robert Collins (lifeless) wrote :

naughty bot :)

tags: removed: qa-needstesting
Ursula Junque (ursinha) wrote :

@lifeless If you don't want the bot to touch the bug, you should mark it as incremental! :) ec2 land --incremental or add [incr] tag to the commit msg manually; should do the trick.

On Thu, Aug 19, 2010 at 3:24 AM, Ursula Junque <email address hidden> wrote:
> @lifeless If you don't want the bot to touch the bug, you should mark it
> as incremental! :) ec2 land --incremental or add [incr] tag to the
> commit msg manually; should do the trick.

Yeah, problem is that:
 - the previous commit was *thought* to fix it [so arguably qa-bad], but
 - it didn't make it worse [so really just neutral]

:)

Changed in launchpad-registry:
status: In Progress → Fix Committed
tags: added: qa-ok
Curtis Hovey (sinzui) on 2010-09-09
Changed in launchpad-registry:
status: Fix Committed → Fix Released
Changed in launchpad-registry:
milestone: 10.09 → 10.10
tags: added: qa-needstesting
removed: qa-ok
tags: added: qa-ok
removed: qa-needstesting
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-ok
tags: added: qa-ok
removed: qa-needstesting
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers