Merge lp://staging/~gmb/launchpad/stored-proc-for-bug-heat-bug-582195 into lp://staging/launchpad/db-devel
Status: | Merged |
---|---|
Merged at revision: | 9414 |
Proposed branch: | lp://staging/~gmb/launchpad/stored-proc-for-bug-heat-bug-582195 |
Merge into: | lp://staging/launchpad/db-devel |
Diff against target: |
387 lines (+211/-33) 6 files modified
database/schema/security.cfg (+1/-0) database/schema/trusted.sql (+115/-0) lib/lp/bugs/configure.zcml (+4/-2) lib/lp/bugs/doc/bug-heat.txt (+66/-20) lib/lp/bugs/interfaces/bug.py (+3/-0) lib/lp/bugs/model/bug.py (+22/-11) |
To merge this branch: | bzr merge lp://staging/~gmb/launchpad/stored-proc-for-bug-heat-bug-582195 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | rc | Approve | |
Björn Tillenius (community) | db | Approve | |
Stuart Bishop (community) | db | Approve | |
Canonical Launchpad Engineering | code | Pending | |
Review via email: mp+26064@code.staging.launchpad.net |
This proposal supersedes a proposal from 2010-05-26.
Commit message
Add a stored procedure to update bug heat.
Description of the change
This branch takes the code in lib/lp/
The idea behind this is that we need to do bug heat calculations in the DB rather than in code, since the setup and teardown surrounding doing the calculations in code is far to slow and cumbersome.
I've added an updateHeat() method to IBug, which calls the new stored procedure. I've used this in setPrivate() and setSecurity() to replace the manual adding-
In psql:
SELECT calculate_
In iharness:
>>> from lp.bugs.
>>> bug_1 = getUtility(
>>> calculator = BugHeatCalculat
>>> calculator.
On Wed, May 26, 2010 at 10:50:49AM -0000, Graham Binns wrote:
> The stored procedure is currently not hooked up to anything, but once
> the patch is applied it's easy to check the results of the stored
> procedure against the existing code using psql and an iharness session,
> thus:
Why not hook it up directly? It would be useful to have this tested,
since it's hard to check that it's doing what it should be doing.
-- /launchpad. net/~bjornt
Björn Tillenius | https:/