BranchMergeProposal:+index timeout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Robert Collins |
Bug Description
OOPS-1868C346 - https:/
OOPS-1868C344
OOPS-1681EC3984
OOPS-1899K170
BranchMergeProp
51. 1904 11559ms SQL-launchpad-
SELECT "_13637".branch,
FROM BranchRevision AS "_13637"
LEFT JOIN BranchRevision AS "_13638" ON "_13638".branch = 24637
AND "_13638".revision = "_13637".revision
WHERE "_13637".branch = 446546
AND "_13637".sequence IS NOT NULL
AND "_13638".branch IS NULL
ORDER BY "_13637".sequence DESC LIMIT 10
with source AS (SELECT branchrevision.
FROM BranchRevision
where branchrevision.
order by branchrevision.
SELECT source.branch, source.revision, source.sequence from source where
source.revision not in (select revision from BranchRevision AS target where target.branch = 24637 and source.
ORDER BY source.branch desc, source.sequence DESC LIMIT 10;
has a substantially cheaper plan
Related branches
- Robert Collins (community): Approve
- Ian Booth (community): Approve (*code)
-
Diff: 57 lines (+15/-14)2 files modifiedlib/lp/code/interfaces/branchmergeproposal.py (+1/-1)
lib/lp/code/model/branchmergeproposal.py (+14/-13)
tags: | added: pg83 |
Changed in launchpad: | |
importance: | High → Critical |
description: | updated |
tags: |
added: dba removed: pg83 |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: qa-ok removed: qa-needstesting |
I call contention. There are over half a billion rows in the table. It gets its new rows in large chunks, often 10k records at a time. Still, 14 seconds is silly.
Assuming contention the BranchRevision table isn't disappearing in the near future, I think this needs to be addressed in the branch scanner with more frequent (or even constant) commits.
There is no link to the actual OOPS here, so flagging incomplete.