Muting bug 1 times out

Bug #744888 reported by Jonathan Lange
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Gary Poster

Bug Description

 * Go to bug 1 <https://bugs.launchpad.net/ubuntu/+bug/1>
 * Click "Mute bug mail"
 * Watch as the throbber throbs
 * Get a timeout

The OOPS associated with this problem is OOPS-1914B944.

The problem appears to be caused by fetching all the indexed messages for Bug 1 (see lib/lp/bug/model/bug.py:524-538) whilst muting, though I'm not clear on why that's getting called at all.

Related branches

Revision history for this message
Graham Binns (gmb) wrote : Re: [Bug 744888] [NEW] Muting bug 1 times out

A thousand bottoms. And the timeout doesn't come with an OOPS, either,
which is irritating. I shall have to have a dig around in the OOPS
report.

Graham Binns (gmb)
Changed in launchpad:
status: Triaged → In Progress
Revision history for this message
Robert Collins (lifeless) wrote :

I've linked this to grahams branch and marked it bad-commit: matching the interface is unrelated to the change - but the change will force the parent attribute to None, which is incorrect. The specific callsite involved should be changed, *not* the default for the function.

tags: added: bad-commit-12754
Revision history for this message
Robert Collins (lifeless) wrote :

Further, do we have an oops code for this yet?

Graham Binns (gmb)
Changed in launchpad:
status: In Progress → Triaged
description: updated
Revision history for this message
Robert Collins (lifeless) wrote :

Ok, bug 740750 is making this very hard to analyze.

At a guess though:

=== modified file 'lib/lp/bugs/interfaces/bug.py'
--- lib/lp/bugs/interfaces/bug.py 2011-03-29 05:38:15 +0000
+++ lib/lp/bugs/interfaces/bug.py 2011-04-06 19:08:50 +0000
@@ -394,13 +394,14 @@
             readonly=True,
             value_type=Reference(schema=IMessage)))

- indexed_messages = exported(
+ indexed_messages = doNotSnapshot(
+ exported(
         CollectionField(
             title=_("The messages related to this object, in reverse "
                     "order of creation (so newest first)."),
             readonly=True,
             value_type=Reference(schema=IMessage)),
- exported_as='messages')
+ exported_as='messages'))

     def _indexed_messages(include_content=False, include_parents=False):
         """Low level query for getting bug messages.

will fix this

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

11:34 < _mup_> Bug #744888: Muting bug 1 times out <bad-commit-12754> <story-better-bug-notification> <timeout> <Launchpad itself:Triaged> < https://launchpad.net/bugs/744888 >
11:35 < sinzui> lifeless: I thought Snapshot was taught to always ignore collection fields
11:36 < lifeless> sinzui: Thus I'm asking you :)
11:36 < sinzui> ah, but bugs and questions want to snapshot for the last message I think. Maybe it was not done
11:37 < lifeless> a collection snapshot could just record the tip message (for some apporpriate order)
11:37 < lifeless> and the delta is 'messages newer than X'
11:37 < lifeless> [e.g. see my batch navigator work]

11:50 < lifeless> sinzui: ok so we faded out there
11:50 < lifeless> sinzui: is my suggestion a) broken, b) sensible, c) we need to modify how snapshotting deals with collections ?
11:51 < lifeless> sinzui: or d) none of the above
11:52 < sinzui> lifeless: sorry. I very distracted. IAre we certain that is needed? was it cargo culted from old code?
11:53 < sinzui> as for bug and questions looking at messages, I think that is lazy design. I believe there are two emitters of the modifications and they know if a message was appended
11:53 < lifeless> sinzui: bug one has several thousand messages
11:54 < lifeless> sinzui: I'm certain we either need to not snapshot it, or snapshot it much more efficiently
11:54 < lifeless> sinzui: *and* I'm certain that what is snapshotted internally shouldn't match the API attributes for this object either, as the API has different needs vs in-appserver deltas.
11:55 < sinzui> So the publisher emitting the event should be clear what message was added instead of letting the subscriber guess. I do not think snapshot should be working with deap data
11:55 < sinzui> deep
11:56 < lifeless> sinzui: ok, cool.
11:56 < lifeless> so we doNotSnapshot it, see what breaks, fix the signal to contain the new message if needed
11:57 < sinzui> yep

Gary Poster (gary)
Changed in launchpad:
assignee: nobody → Gary Poster (gary)
Revision history for this message
Gary Poster (gary) wrote :

No tests fail if you simply make the change that Robert described. That makes me a bit nervous, actually.

That said, I'm not sure what else to check other than clicking around a bit. I'll plan to do a bit more verification that this does what we need, and then land this Monday.

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.05
tags: added: qa-needstesting
Changed in launchpad:
status: Triaged → Fix Committed
Revision history for this message
Robert Collins (lifeless) wrote :

Works on qastaing for wgrant. win.

tags: added: qa-ok
removed: qa-needstesting
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.