[MERGE] Commit updates sha-cache

John Arbash Meinel john at arbash-meinel.com
Thu Sep 25 18:05:03 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> Refreshed for NEWS conflicts
> 

+    * New race-free method on MutableTree ``get_file_with_stat`` for use
+      when generating stat cache results. (Robert Collins)
+

^- I thought I should point out that 'get_file_with_stat' is not 100%
race free. If someone is writing to the file while we are reading it,
the stat value could give a different size than sum(map(len, lines))).

I think it is *less* racy than doing two calls, but I think it would be
technically better to do the stat after we've finished reading, rather
than before we start. (slightly different race, but the mtime will show
up newer)

I'm not saying we have to do that to land this, but I thought I would
bring up the discussion.

John
=:>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjbxL4ACgkQJdeBCYSNAAPb4gCgt8CdUCcCCjRnuiR5/N35QYMR
XvAAnAz9EKdy2kz9sLOeY1w0sAzql9dg
=6MDV
-----END PGP SIGNATURE-----



More information about the bazaar mailing list