OOPS when updating the details of a bug tracker with a large number of bug watches

Bug #447100 reported by Graham Binns
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Gavin Panella

Bug Description

When updating the details of the gnome-bugs bug tracker, which has some 13,000 watches against it, I get OOPS-1378EB433. This happens for debbugs, which has ~ 10,000 watches, too (OOPS-1378EC458).

The error raised in both cases is "ShortListTooBigError: Hard limit of 5000 exceeded" in snapshot_sql_result(). This is probably because a snapshot of a BugTracker would include all its BugWatches. Since the use of shortlist() in snapshot_sql_result() expects a hard limit of 5000, a large number of watches will cause it to blow up.

Related branches

Deryck Hodge (deryck)
Changed in malone:
milestone: none → 3.1.11
Graham Binns (gmb)
Changed in malone:
assignee: nobody → Graham Binns (gmb)
Deryck Hodge (deryck)
Changed in malone:
milestone: 3.1.11 → 3.1.12
Revision history for this message
Graham Binns (gmb) wrote :

As far as we can tell, this is due to the fact that snapshot() takes a copy of all the properties of an object. In the case of a BugTracker, this includes all of its bug watches, and in the case of, say, Gnome Bugzilla, this means 13,000+ bug watches are getting copied.

This isn't something that we can fix for 3.1.12, so I'm unmilestoning and unassigining it. I'm also opening a Foundations task for it, because the Foundations team might be better placed to fix the problem than the bug team.

Changed in malone:
milestone: 3.1.12 → none
assignee: Graham Binns (gmb) → nobody
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

The foundations aspect of this as been fixed (see bug 488762). You now just have to annotate the fields that shouldn't be snapshotted in the interface. I'm sure you can now fix that OOPS for 3.1.12 :-)

Changed in launchpad-foundations:
status: New → Fix Committed
Revision history for this message
Graham Binns (gmb) wrote :

Oh cool.

I'll tackle it if I've got the time certainly.

Gavin Panella (allenap)
Changed in malone:
assignee: nobody → Gavin Panella (allenap)
status: Triaged → In Progress
Revision history for this message
Curtis Hovey (sinzui) wrote :

lp/registry/interfaces/person.py uses it like this:
from lazr.lifecycle.snapshot import doNotSnapshot
subscribers = exported(doNotSnapshot(...))

Revision history for this message
Gavin Panella (allenap) wrote :

Landed in devel r10087

Changed in malone:
milestone: none → 10.01
status: In Progress → Fix Committed
Gavin Panella (allenap)
Changed in malone:
status: Fix Committed → Fix Released
Gary Poster (gary)
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
Revision history for this message
Guilherme Salgado (salgado) wrote :

Is this the same as OOPS-1547C2671?

Revision history for this message
Gavin Panella (allenap) wrote :

@salgado It's similar but not the same. This bug was about BugTracker.watches specifically. OOPS-1547C2671 is caused by Bug.users_affected_with_dupes I think.

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.