Comment 14 for bug 522637

Revision history for this message
Andrew Bennetts (spiv) wrote :

Short answer: the repository has bad data, but it can be repaired. I have a fix for the cause of the bad data (see branch linked to this bug) and will provide a tool to do the repair soon. There is no data loss.

Long, jargon-filled answer:

The root cause here is that CHKMap.apply_delta and CHKMap._check_remap had bugs that meant that it could generate a CHK map with a non-canonical form. In the case of lp:do, there are some inventories records that exist in both lp:do and the branch it is stacked on (lp:do/0.9), but that have different CHK roots. Mostly this sort of inconsistency doesn't cause trouble, but in this case one of the inventories is at the stacking boundary, and fetch relies on the invariant that a given inventory record will be identical in both repositories: it fetches the inventory record for a parent inventory at the stacking boundary from one repo, then fetches CHK roots from the other. If the source repositories disagree on the CHK roots for that inventory then the target finds the CHK roots are missing, causing the error reported in this bug.