Product:+bugs timeout with search for bugs without tags (tag:-*)

Bug #501945 reported by jazzynico
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Peter Clifton

Bug Description

Hello,

When I use the advanced search page to restrict my search with tags: -*, I almost always get a page saying:

Timeout error
Sorry, something just went wrong in Launchpad.
We’ve recorded what happened, and we’ll fix it as soon as possible. Apologies for the inconvenience.
Trying again in a couple of minutes might work.
(Error ID: OOPS-1461N1656)

Even when the result count is relatively low.

Example:

* All new bugs in Inkscape works (https://bugs.launchpad.net/inkscape/+bugs?field.searchtext=&orderby=-importance&search=Search&field.status%3Alist=NEW&assignee_option=any&field.assignee=&field.bug_reporter=&field.bug_supervisor=&field.bug_commenter=&field.subscriber=&field.omit_dupes.used=&field.omit_dupes=on&field.has_patch.used=&field.has_cve.used=&field.tag=&field.tags_combinator=ANY#)

* But all new bugs with no tags doesn't (https://bugs.launchpad.net/inkscape/+bugs?field.searchtext=&orderby=-importance&search=Search&field.status%3Alist=NEW&assignee_option=any&field.assignee=&field.bug_reporter=&field.bug_supervisor=&field.bug_commenter=&field.subscriber=&field.omit_dupes.used=&field.omit_dupes=on&field.has_patch.used=&field.has_cve.used=&field.tag=-*&field.tags_combinator=ANY#)

Tested with the beta and current platforms with the same problem.

Related branches

Curtis Hovey (sinzui)
affects: launchpad → malone
Deryck Hodge (deryck)
Changed in malone:
status: New → Triaged
importance: Undecided → High
tags: added: oops
Revision history for this message
rew (r-e-wolff) wrote :

At least the "check for similar bugs" works. I tried reporting "can't search for no-tags", found the bug, found the "has been released", checked it, and got the "timeout" all the time when I followed the manual on how to search for no-tags. Then tried reporting "always get timeout", but the system suggested this report.

Anyway, I'm triaging Hugin-bugs, and forgot to add tags in the beginning so I want to search for "no tags" to be able to tag them appropriately.

Revision history for this message
rew (r-e-wolff) wrote :

Apparently the "we'lll fix it as soon as possible" promise is an empty one as nothing happens.

----------------------
Timeout error

Sorry, something just went wrong in Launchpad.

We’ve recorded what happened, and we’ll fix it as soon as possible. Apologies for the inconvenience.

Trying again in a couple of minutes might work.

(Error ID: OOPS-1819A1102)

rew (r-e-wolff)
tags: added: search tags
Revision history for this message
Robert Collins (lifeless) wrote :

See bug 701250 for analysis and reference queries, but basically:
The tag search is indeed the problem, we have 700K rows in there.

this is how I'd phrase it:
NOT EXISTS (SELECT DISTINCT BugTag.bug from BugTag where BugTag.bug=Bug.id)
(for the -* case)
The distinct is because we don't need to know how many bugtags there are, and 8.4 doesn't short circuit such clauses like 8.3 did.

An updated Oh, and the query takes 7ms with NOT EXISTS.

Peter Clifton wrote on 2011-01-12: #6
Not that I probably need to point this out to LP developers, but in case it saves someone a search...

The SQL for this is generated in lib/lp/bugs/model/bugtask.py

summary: - Advanced search with -* tag leads to timeout
+ Product:+bugs timeout with search for bugs without tags (tag:-*)
tags: added: timeout
removed: oops
Changed in launchpad:
importance: High → Critical
Peter Clifton (pcjc2)
Changed in launchpad:
assignee: nobody → Peter Clifton (pcjc2)
Revision history for this message
Peter Clifton (pcjc2) wrote :

Chatting on IRC with lifeless, we decided that the DISTINCT part of the select query is not benefical.

I'm cooking a branch which fixes all the tag search cases to add "WHERE BugTag.bug = Bug.id" in addition to the normal clauses, save querying 700k rows for each bug.

Peter Clifton (pcjc2)
Changed in launchpad:
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
Changed in launchpad:
milestone: none → 11.02
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
tags: added: qa-ok
removed: qa-needstesting
Revision history for this message
Peter Clifton (pcjc2) wrote :

The inkscape query seems to work on qastaging (a second time at least)

Changed in launchpad:
status: Fix Committed → Fix Released
Revision history for this message
jazzynico (jazzynico) wrote :

Fix tested and confirmed in r12200.
It's going to make my triage work a lot easier.
Many thanks!

Revision history for this message
rew (r-e-wolff) wrote :

confirmed. Works!

Revision history for this message
Peter Clifton (pcjc2) wrote :

Just following up, there is a related class of bugs which exist in LP, I'm filing as #705582

Revision history for this message
Peter Clifton (pcjc2) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.