[MERGE][bug #153786] Partial fix for retrying if a pack file disappears
John Arbash Meinel
john at arbash-meinel.com
Thu Oct 23 22:13:54 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Attached is a partial fix for bug #153786. Basically, it changes the
CombinedGraphIndex layer so that it is able to tell the
RepositoryPackCollection to reload its list of pack files if we get a
This is the easier part to fix, and I think it will end up handling 90%
of the times when someone encounters the bug. I wanted to put it up for
review early, just to make sure we felt it was a reasonable way to go.
The basic idea is that all CGI functions will trap NoSuchFile and issue
a reload of the pack names, and then try again. As most of these
functions are iterators, they will sometimes have already yielded
information from an index which no longer exists. For many cases, this
doesn't matter. (get_parent_map(), for example, doesn't care what index
it got the info from, as long as it got the info.)
The race condition which is left, is when we are trying to actually get
the content out of the repository. Consider "bzr log" when half-way
through the repo gets repacked. We'll have already worked out what .pack
files we want to read and where the data is inside them (having
consulted the index already) but when we issue a request for the data,
it will be missing.
I'll be working on that part next.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the bazaar