BugTask.conjoined_master shouldn't use shortlist()

Bug #226535 reported by Graham Binns
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Curtis Hovey

Bug Description

There are a lot of warnings in the checkwatches log of this nature:

/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/launchpad/database
/bugtask.py:467: UserWarning: shortlist() should not be used here. It's meant to
listify sequences with no more than 15 items. There were 47 items.

shortlist() is used in BugTask.conjoined_master to listify the BugTask's Bug's BugTasks sequence. If this warning is getting raised this often it should probably be changed to use list().

Related branches

Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 226535] [NEW] BugTask.conjoined_master shouldn't use shortlist()

On Sun, May 04, 2008 at 03:56:03PM -0000, Graham Binns wrote:
> shortlist() is used in BugTask.conjoined_master to listify the BugTask's
> Bug's BugTasks sequence. If this warning is getting raised this often it
> should probably be changed to use list().

No, it shouldn't use list(); shortlist() is the right thing to use here,
since whenever getting an unknown (unbounded) number of things from the
db, we want to put a limit on the number of rows returned.

The right thing to do there is to increase the limit. You can specify
the limit when calling shortlist().

Revision history for this message
Curtis Hovey (sinzui) wrote :

The problem attributes in the interface can be annotated with the nosnapshot directive

Changed in malone:
importance: Undecided → Low
status: New → Triaged
tags: added: oops
Changed in launchpad:
importance: Low → Critical
Revision history for this message
Curtis Hovey (sinzui) wrote :

Lp has about 100 pathoglogical bugs. I suspect we need to increase the size of the shortlist, of allow users to delete invalid bug tasks that could not be retargeted.
 # bugs | # bug tasks
--------+-------
     16 | 15
     17 | 11
     18 | 19
     19 | 12
     20 | 6
     21 | 13
     22 | 4
     23 | 5
     24 | 8
     25 | 3
     26 | 3
     27 | 3
     28 | 3
     30 | 5
     32 | 1
     34 | 1
     35 | 3
     36 | 1
     37 | 1
     40 | 1
     44 | 1
     45 | 1
     46 | 4
     47 | 1
     52 | 3
     54 | 2
     71 | 1
     72 | 1
     73 | 1
     75 | 1
     92 | 1
   159 | 1

Revision history for this message
Robert Collins (lifeless) wrote :

I think we should pragmatically just raise the figure for now to (say) 200, finish the bug task:+index performance work (potentially including deletes) and then reevaluate.

Curtis Hovey (sinzui)
Changed in launchpad:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
milestone: none → 11.03
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :

Fixed in db-stable r10261 (http://bazaar.launchpad.net/~launchpad-pqm/launchpad/db-stable/revision/10261) by a commit, but not testable.

tags: added: qa-untestable
removed: qa-ok
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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