Read-only tree can't read head (Re: Web interface update)
Aaron Bentley
aaron.bentley at utoronto.ca
Sun May 22 18:36:45 BST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> On Sat, 2005-05-21 at 20:04 -0400, Aaron Bentley wrote:
>>That means a separate lock for the statcache, I think.
>
> No, I don't think it's needed because the cache is just a single file
> and it's renamed into place.
Well, it's also because all data in the file is entirely optional. I
can imagine race conditions like:
1. A reads data to update the cache
2. C alters files
3. B reads data to update the cache
4. B writes data to the cache
5. A writes data to the cache
With most data files, this could be a disaster. In the case of the
cache, any entries in the cache written by A that differ what B wrote
will simply be ignored, since the stat data shows they're out of date.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCkMMt0F+nu1YWqI0RAlVWAJ9j1W15YFLcO+clNflYqh8ZAGIB1gCfYpF+
aIuKYPep78cTvSsAZkRE3L4=
=SUpg
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list