[merge] knit index robustness/corruption?
Robert Collins
robertc at robertcollins.net
Tue Jun 26 23:09:12 BST 2007
On Mon, 2007-06-25 at 19:24 +1000, Martin Pool wrote:
> I have, for some reason, a knit file with an incorrect index record.
> It does not look like the kind of problem that originated in Bazaar,
> so I suspect perhaps a network or even hardware error. I have had a
> couple of hard crashes on this machine is recent weeks.
>
> The line in question, 4751, is in the middle of the file, pretty old,
> and in between other correct records.
> 4751 pqm at pqm.ubuntu.com-20060504081215-e807a459c8bcb379 fulltext
> 1723037 423 471v 4747 :
So this corruption means that the parent of this record cannot be
ascertained.
> It is correct in a freshly pulled repository.
This suggests it either went bad ages ago, or that pull had a local
memory corruption occur - as knit indexes are generated fresh on local
write.
> In general knits are meant to just skip truncated index records. I'm
> not sure they should silently skip incorrect records, but it's
> probably good to at least make it possible to read the file.
>
> This probably needs to be tested by having an example of a knit file
> which is disturbed in this way, but I thought I'd get comments on the
> patch itself first.
The patch is wrong : its stripping the parent from the record being
processed, rather than skipping the record being processed. This will
lead to incorrect parents on that record, rather than that record being
absent.
An important question here is - is the dictionary compression of parents
in subsequent records pointing at this record (bad - we can't eliminate
that record) or is this record discounted (good - its known to be bad,
and nothing is using it, its just our parser having trouble).
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070627/cf19885e/attachment.pgp
More information about the bazaar
mailing list