lock free dirstate

John Szakmeister john at szakmeister.net
Tue Sep 29 00:22:30 BST 2009


On Mon, Sep 28, 2009 at 9:57 AM, John Arbash Meinel
<john at arbash-meinel.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Robert Collins wrote:
>> I plan to do an experiment this week on an OSLock free dirstate - this
>> should work more robustly on NFS, AFP etc. I've tagged the bugs that
>> stood out as being fixed by this as 'dirstate2' in launchpad.
>>
>> The design I plan to use is the one that I've spoken about before:
>>  - write a collection of dirstate files named by hash (like we do
>> in .bzr/repository)
>>  - have old dirstate files attempt to rm but handle them being open by
>> other processes by leaving them behind
>>  - have a near-atomic pointer file in the root that is updated by the
>> standard foo.tmp, mv foo foo.old, mv foo.tmp foo, rm foo.old code
>
> ^- Presumably you don't need to 'mv foo foo.old' on POSIX platforms?

Or maybe leave it as is, if the goal is to do a better job on remote
filesystems?  For instance, if I mount my Windows share under my Linux
box?

-John



More information about the bazaar mailing list