[PATCH 2 of 2] lock: include Linux pid namespace identifier in prefix

Jun Wu quark at fb.com
Mon Feb 13 16:12:55 EST 2017


Excerpts from Siddharth Agarwal's message of 2017-02-13 13:07:08 -0800:
> On 2/13/17 13:03, Jun Wu wrote:
> > I think it could be an extension outside core.
> 
> I'd say make it a clone-time option, turned off by default, with caveats 
> documented. At FB we ban the situations where flock wouldn't work for 
> scalability reasons anyway.

flock should scale better than the file-existence locks - it does not
write physically.

> Note that flock requires the file be permanently on disk. We shouldn't 
> use .hg/lock and .hg/wlock -- instead, we'll probably have to 
> create/assume new files .hg/flock and .hg/fwlock.]

That's not an issue - flock works on directories. So locking ".hg" or
".hg/store" would be feasible.


More information about the Mercurial-devel mailing list