getMergeProposals(merged_revision=...) is very slow

Bug #1074385 reported by Aaron Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Critical
Unassigned

Bug Description

The getMergeProposals method times out or is very slow. Branch privacy seems like the culprit, since it worked fine until recently.

Example: OOPS-087f61d6004ef6a55d258767a69fb58e

To reproduce:
bzr lp-find-proposal -r revid:<email address hidden>

Aaron Bentley (abentley)
description: updated
Revision history for this message
Aaron Bentley (abentley) wrote :

Oddly, I myself, am having trouble reproducing this. Perhaps it's actually due to row locks?

Curtis Hovey (sinzui)
tags: added: api branches
Revision history for this message
Curtis Hovey (sinzui) wrote :

There are no oopses last week for this, but they appear for the first time in
https://oops.canonical.com/static-reports/LP-PROD-2012-11-01.html
    OOPS-087f61d6004ef6a55d258767a69fb58e

tags: added: timeout
tags: removed: regression
Revision history for this message
Curtis Hovey (sinzui) wrote :

This is a much rarer occurrence of bug 722956 which was once common before code was optimised.

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

This performs slowly because of the join though branchrevision.

tags: removed: privacy
Revision history for this message
William Grant (wgrant) wrote :

The problem is that getMergeProposals(merged_revision=...) filters against BranchMergeProposal.merged_revno, via BranchRevision and Revision. It should be able to use BranchMergeProposal.merged_revision_id directly, but that doesn't seem to always be set.

summary: - Timeout from getMergeProposals
+ getMergeProposals(merged_revision=...) is very slow
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.