Failure to autopack because of 'missing inventories'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Critical
|
John A Meinel | ||
2.0 |
Fix Released
|
High
|
John A Meinel | ||
Launchpad itself |
Fix Released
|
High
|
Unassigned |
Bug Description
After Andrews' recent fix
4661 Canonical.com Patch Queue Manager 2009-09-09 [merge]
(andrew) Fail commit_write_group for 2a if any relevant inventory,
chk_bytes or text reference is absent (#406687).
for bug #406687, I ended up with a repository, where the pack files had 'skewed'. Namely, it seemed that I had some inventories in one pack file, and the associated revisions in a different pack file. When autopack ran, it saw that it wanted to combine the pack file that had the revisions, but *not* the one that had the inventories.
Because autopack works across just the subset of pack files that look "too loose", the check ran and then raised a failure because it thought that the inventories were not present.
Doing a full 'bzr pack' on the affected repository worked fine, and meant that future pushes worked as well.
So workaround 1 is to manually pack the repo.
A possible fix is to change the 'do I have enough inventories' logic, so that it checks the indexes in the entire repository, and not just the pack files being generated.
Arguably, we may want to keep the inventories in the same pack files (meaning that even though we have them in pack A, we'll copy them to pack B to keep them 'together').
However, we don't have the texts for a given revision all in the same pack file, nor the chk pages, since those don't change every commit. So logically we have to handle the split anyway.
I'm thinking this is probably Critical, because if someone 'in the wild' encounters this, they really won't know what is wrong. We could downgrade it to 'High' because 'bzr pack' works around it, though.
Filing against bzr 2.0.x because Andrew's patch landed there.
Related branches
- Vincent Ladeuil: Approve
-
Diff: 163 lines (+118/-5)3 files modifiedNEWS (+4/-0)
bzrlib/repofmt/groupcompress_repo.py (+13/-4)
bzrlib/tests/test_repository.py (+101/-1)
Changed in bzr: | |
milestone: | 2.0.1 → none |
Changed in bzr: | |
assignee: | nobody → canonical-bazaar (canonical-bazaar) |
tags: | added: missing-inventory packs |
tags: | added: mysql |
Changed in bzr: | |
assignee: | canonical-bazaar (canonical-bazaar) → John A Meinel (jameinel) |
Changed in bzr: | |
status: | Confirmed → In Progress |
Changed in launchpad: | |
status: | New → Triaged |
importance: | Undecided → High |
John A Meinel wrote:
[...]
> A possible fix is to change the 'do I have enough inventories' logic, so that
> it checks the indexes in the entire repository, and not just the pack files
> being generated.
Hmm, that's what it should be doing already:
etc.
And looking at your original error report, it says:
“ValueError: We are missing inventories for revisions:”
Which is not an error from my new check (it would raise BzrCheckError, and
never uses that exact message). So I don't think my change is the culprit.
Instead it appears _copy_inventory _texts in GCCHKPacker is what's failing,
and at a glance it appears that indeed it assumes that the inventory for a
revision will be in the same set of packs being packed.