need automatic recovery from truncated pack/index files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Unassigned |
Bug Description
The most common corruption-type problem we see at the moment is that users have 0-byte index or pack files. This is probably happening because of a machine crash or similar failure causing the filesystem to see the file exists but without any content.
It would be nice if we could more cleanly recover from this without people specifically needing to ask for help.
Some ideas:
- an option to fsync files before treating the repository update as complete, so we're sure the data is really on disk before the packs are referenced (bug 343427)
- if we see a pack file with 0 bytes, treat it as nonexistent (and perhaps give a warning?)
- teach check to hash the files and move away any that aren't consistent; perhaps give check an option to do only this quick/cheap check
description: | updated |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
Note that I think fsyncdata may be needed, on the files and the
directories. (file content and metadata being separate..)