← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] lp:~cjwatson/launchpad/germinate-all-dev-series into lp:launchpad

 

I played with @cachedproperty and friends a bit.  I eventually decided that I wasn't massively keen on relying on the generational cache for correctness rather than just performance, and switching to the stupid cache started to seem like overengineering for the problem at hand.  Instead, I just dropped the CachedDistroSeries business and fetched the relevant properties inside the loop over self.series, so we end up with one transaction per series; this should be fine and is IMO much more obviously correct at sight, which I think is valuable.

The point of the DatabaseBlockedPolicy was just to avoid holding a transaction open while doing lengthy computations.  Doing a few queries at the start of the loop body for each series shouldn't be a problem; and in any case that loop will only iterate over a single series in production.
-- 
https://code.launchpad.net/~cjwatson/launchpad/germinate-all-dev-series/+merge/86909
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/germinate-all-dev-series into lp:launchpad.


References