lock free dirstate - prototype

Robert Collins robert.collins at canonical.com
Wed Sep 30 07:31:43 BST 2009


On Wed, 2009-09-30 at 06:24 +0100, Martin Pool wrote:

On the case of bounded garbage, its complicated because we don't know if
a hash-named file is 
a) garbage
b) a pending concurrent update from 'bzr st' or similar

I guess we can just attempt to delete them all during a semantic update.

The problems I see are that its not well bounded, and the stat cache
writers will need to handle more cases.

In any event, I've done my main spike; I'm waiting some folk looking at
it more closely, and we can make concrete alterations from there on in.

> It also tends to make us do more work than we have to for operations
> like
> 
>   echo foo >>iso
>   bzr st
>   echo bar >>iso
>   bzr st
> 
> This particular case may have been squashed, but the hashcache
> approach makes it likely we'll read and hash the whole file, and write
> the whole dirstate, on each operation, quite unnecessarily.  To me
> this is much more common than just touching a dirstate file. 

We only hash a file if the size is unchanged.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090930/9f85dfe9/attachment.pgp 


More information about the bazaar mailing list