bug notification script needs to be optimized
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Gary Poster |
Bug Description
The database utilization report has picked up that bug notifications is now chewing 17% of a master database CPU core, up from <1%.
It changed on March 10 (https:/
Therefore, it seems likely that this is caused by the work to address bug 164196 ("Quickly-undone actions shouldn't send mail notifications") is the culprit (http://
An obvious optimization is to get the activity along with the notification. This bug is to perform that optimization. I expect that will reduce the database usage.
I would be very surprised if it would get us down to the previous number. We need to look at more data than before in order to answer these questions, at least without bigger changes than I intend to contemplate right now.
Related branches
- j.c.sackett (community): Approve
-
Diff: 450 lines (+183/-67)6 files modifiedlib/lp/bugs/interfaces/bugnotification.py (+3/-3)
lib/lp/bugs/model/bug.py (+1/-1)
lib/lp/bugs/model/bugnotification.py (+73/-34)
lib/lp/bugs/scripts/bugnotification.py (+42/-14)
lib/lp/bugs/scripts/tests/test_bugnotification.py (+29/-12)
lib/lp/bugs/tests/test_bugnotification.py (+35/-3)
- j.c.sackett (community): Approve
-
Diff: 429 lines (+151/-74)8 files modifieddatabase/schema/security.cfg (+2/-0)
lib/canonical/launchpad/helpers.py (+5/-28)
lib/canonical/launchpad/tests/test_helpers.py (+0/-34)
lib/lp/bugs/scripts/bugnotification.py (+4/-5)
lib/lp/registry/model/person.py (+64/-0)
lib/lp/registry/tests/test_person.py (+69/-1)
lib/lp/services/mail/notificationrecipientset.py (+5/-4)
lib/lp/soyuz/scripts/ppareport.py (+2/-2)
- Brad Crittenden (community): Approve (code)
-
Diff: 467 lines (+189/-115)5 files modifiedlib/lp/bugs/interfaces/bugnotification.py (+9/-3)
lib/lp/bugs/model/bugnotification.py (+61/-10)
lib/lp/bugs/scripts/bugnotification.py (+31/-41)
lib/lp/bugs/scripts/tests/test_bugnotification.py (+4/-3)
lib/lp/bugs/tests/test_bugnotification.py (+84/-58)
Changed in launchpad: | |
status: | Triaged → In Progress |
assignee: | Launchpad Yellow Squad (yellow) → Gary Poster (gary) |
Changed in launchpad: | |
status: | Fix Committed → In Progress |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
My thought: http:// pastebin. ubuntu. com/585075/