← Back to team overview

launchpad-dev team mailing list archive

Re: decoupling bugmessage and message in the schema

 

On Thursday, 7 April 2011, Robert Collins <robertc@xxxxxxxxxxxxxxxxx> wrote:
> Now, I may be wrong, but I think its worth duplicating message rather
> than sharing them between bugs and questions and merge proposals: we
> have /very/ few shared messages today (640 bug messages have shared
> ids). This doesn't need to mean duplicate model code, but we may need
> to do something a little fancy to reuse model code with different db
> tables.
>
> Having a single table with the abillty to answer all three constraints
> (bug, message owner, message index) at once would let postgresql do a
> bitmap join between the bugtask.bug and bugmessage.bug fields (given
> an appropriate index on bugmessage - and then bring in the bug itself
> for privacy and product visibility.
>
> We can move incrementally to this - for instance, we can start with
> denormalised trigger-maintained fields on bugmessage, and if we can
> get great queries out of that, do the larger shuffle.
>
> Are there any reasons we /shouldn't/ do this?

For what my it's-nearly-3-am-and-I'm-still-awake-godsdamnit opinion is
worth, I can't think of any. I don't think we can realistically
consider massive improvements to the bug page - especially in edge
cases like bug 1 - without doing something about BugMessage->Message.

Incidentally, would such a change help with the problems seen with
Bug._indexed_message() (e.g. Bug 744888)? I'm assuming so, but see
above under reasons for impaired mental acuity on my part.

-- 
Graham Binns | PGP Key: EC66FA7D
http://launchpad.net/~gmb



Follow ups

References