[BUG] stat cache doesn't handle old pathnames with new ids properly
Martin Pool
mbp at sourcefrog.net
Mon Jul 4 13:10:51 BST 2005
On 3 Jul 2005, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> Today, I was testing out baz2bzr on the MoinMoin Arch tree, because its
> creator, Thomas Waldman, was interested in bzr.
>
> We both found we got lots of warning messages about duplicate paths in
> the cache.
>
> It appears the stat cache doesn't delete entries that don't match files,
> and so duplicate entries can be produced.
A bug, obviously. Thanks.
> Is there any particular reason why the statcache is indexed by id,
> rather than pathname? The latter makes sense to me, and reduces the
> number of layers that the statcache must be aware of, and a file's sha-1
> sum doesn't depend on its file-id. (Oh, and it would make this bug
> impossible, because new entries would automatically replace old ones).
I don't think there's any good reason. I may have been thinking that it
would allow for faster id->path translation, but it'd be better just to
make that fast directly, perhaps by an in-memory cache in the inventory.
It should be changed.
Thanks again for the report.
--
Martin
More information about the bazaar
mailing list