Merge ~cjwatson/launchpad:number-cruncher-transactions into launchpad:master
Proposed by
Colin Watson
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | 9bc4751b31d0fc91750f5cd3675cae284f43178a |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:number-cruncher-transactions |
Merge into: | launchpad:master |
Diff against target: |
91 lines (+16/-2) 2 files modified
lib/lp/services/statsd/numbercruncher.py (+11/-2) lib/lp/services/statsd/tests/test_numbercruncher.py (+5/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thiago F. Pappacena (community) | Approve | ||
Review via email: mp+393546@code.launchpad.net |
Commit message
Abort transaction after each number-cruncher loop
Description of the change
We only read from the database, but if we don't end our transaction from time to time then we can end up with incorrect graphs and very long transactions.
To post a comment you must log in.
Do you think it worth adding a comment on `NumberCruncher` class to warn future travelers that we always abort transaction?
Just in case we ever try to use it somewhere outside numbercruncher.tac, and end up with data not being persisted at database.