Merge lp:~lifeless/launchpad/memcache into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merge reported by: | William Grant |
Merged at revision: | not available |
Proposed branch: | lp:~lifeless/launchpad/memcache |
Merge into: | lp:launchpad |
To merge this branch: | bzr merge lp:~lifeless/launchpad/memcache |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email: mp+109551@code.launchpad.net |
Commit message
Remove memcache TALES support and all uses of it, fixing latency-
Description of the change
This branch does four things.
Firstly, it removes a large number of 'band-aid' memcache applications. Our early memcache use was done by putting a slow operation behind a cache-check-or-set helper. This doesn't aid performance much, and gives users poor experiences when they are the first user to use a given page. In addition, as we had no just-in-time expiry mechanism, many of these bandaid-spots resulted in bug reports, e.g. when a user cannot see a bug they just linked to a milestone on the milestone page, or cannot see new series. I can't find the bug reports just now, but I've seen them go by :). We may find there are poorly hidden queries behind things like the front page counters. If so, we should fix them - they will already be causing timeouts (and so this patch may make them more prominent, but it will in no way introduce the bug).
Secondly, it removes a couple of pathological memcache uses, where memcache made the system slower by introducing O(N) scaling to a constant page. memcache accesses cost upwards of 3ms, sometimes as much as 20 for hits, and doing that for every object in a page with hundreds of objects rapidly consumes a lot of time - more than an optimised load+render (which we have since done) requires.
Thirdly, it removes the one remaining arguable legitimate use we have, caching the blog posts on the front page; we have a squid cache that already caches this content, and is getting lots of hits. It is possible that this will turn out to be a catastrophe, but it is more likely that poor processing of object counts on the front page is actually the cause of existing timeouts.
Doing these three things permits the fourth thing, which is to remove our inappropriately layered memcache helper (which acted as a poor http-style cache, see the bugs described in #1 above), and kills a significant amount of LoC - about 1000.
This branch is fine to land, but I suspect the removals are incomplete. I see the TALs 'cache' expression is still registered in lp/services/ memcache/ configure. zcml and I think it is best that it be removed too.
I think this bug work also fixes/invalidates bug 613780, bug 678320, bug 729062, bug 760335. While these bugs are about memcached, not the tales, I do not think anything is really using memcached. memcache_ client_ factory is the only function left, and it is only known to our testing layers. You might as well remove lp.services. memcache.