[PATCH 1 of 21] Thread isolation in hgweb

Gregory Szorc gregory.szorc at gmail.com
Sun Aug 23 02:01:32 UTC 2015


I put together a too-large-to-patchbomb series for making hgweb more thread
safe. Most of the patches are refactoring so all the request-specific state
is isolated on a single object and not shared on the hgweb / WSGI
application instance. The final patches establish a cached local repo class
that knows how to "refresh" a localrepository instance when necessary.
Finally, we establish a pool of repos so hgweb can use a unique
localrepository per thread. This was what mpm said was a prerequisite to
dropping purported thread safety of localrepository.

To obtain the series:

hg pull -r f0a9a8b5bafa https://hg.mozilla.org/users/gszorc_mozilla.com/hg

I haven't explicitly tested to see if this prevents some of the known
threading bugs. I'll have to load up siege to verify. I would say most of
the patches are low-risk until the final 4. If something breaks: I expect
it to be from those 4.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150822/6f23d70f/attachment.html>


More information about the Mercurial-devel mailing list