the code import system calls requestMirror even if no revisions were imported
Bug #487357 reported by
Michael Hudson-Doyle
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Medium
|
Michael Hudson-Doyle |
Bug Description
Even when a code import doesn't import any revisions we call requestMirror. This creates more work for the puller -- about half the runs of the puller currently are for import branches, despite import branches being 1% of all branches on lp -- and even a noop puller run is fairly expensive owing to process start up overheads.
Maybe the fix is to make noop puller runs cheaper by using a process pool or something, but this seems a waste in any case.
Related branches
lp:~mwhudson/launchpad/less-import-requestMirrors-bug-487357
Merged
into
lp:launchpad
- Paul Hummer (community): Approve
-
Diff: 613 lines (+171/-53)13 files modifiedlib/lp/code/browser/branch.py (+9/-1)
lib/lp/code/enums.py (+9/-0)
lib/lp/code/model/codeimport.py (+2/-1)
lib/lp/code/model/codeimportjob.py (+6/-3)
lib/lp/code/model/tests/test_codeimport.py (+16/-3)
lib/lp/code/model/tests/test_codeimportjob.py (+4/-12)
lib/lp/code/stories/codeimport/xx-codeimport-results.txt (+3/-0)
lib/lp/code/templates/codeimport-macros.pt (+2/-4)
lib/lp/codehosting/codeimport/tests/test_worker.py (+24/-2)
lib/lp/codehosting/codeimport/tests/test_workermonitor.py (+35/-2)
lib/lp/codehosting/codeimport/worker.py (+40/-10)
lib/lp/codehosting/codeimport/workermonitor.py (+18/-13)
scripts/code-import-worker.py (+3/-2)
tags: | added: code-import |
Changed in launchpad-code: | |
assignee: | nobody → Michael Hudson (mwhudson) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in launchpad-code: | |
milestone: | none → 10.02 |
Changed in launchpad-code: | |
status: | In Progress → Fix Committed |
Changed in launchpad-code: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Aaron suggested a lo-fi way of fixing this: have the worker exit with a distinct exit code in each of the "success, new revisions", "success, no new revisions" and "error" cases. The way Python is, we more-or-less have to have exit == 1 for the error case, but we can us anything we like for the other cases.