make repair interruption safe
Fixed bug that interrupting git-annex repair (or assistant) while it was fixing repository corruption would lose objects that were contained in pack files. Unpack all pack files and move objects into place *before* deleting the pack files. The old approach moved the pack files to a temp directory before unpacking them, which was not interruption safe. Sponsored-By: Jochen Bartl on Patreon
This commit is contained in:
parent
a492553eca
commit
199391befe
3 changed files with 48 additions and 16 deletions
|
@ -0,0 +1,19 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 16"""
|
||||
date="2021-06-29T16:11:03Z"
|
||||
content="""
|
||||
I have verified that an interrupted repair results in data loss, when
|
||||
.git/objects contains pack files.
|
||||
|
||||
Fixed that. Which leaves 2 open questions:
|
||||
|
||||
* Was the assistant interrupted somehow while it was running repair, in
|
||||
Atemu's case? That could have been anything from the laptop being
|
||||
powered off, to it being stopped explicitly, to it crashing.
|
||||
* What caused the assistant to think it needed repair in the first place?
|
||||
|
||||
Although the answer to the second question doesn't matter much if the
|
||||
data loss bug is fixed -- if there's a problem of some kind causing
|
||||
unncessary repairs, it would only be some excess CPU load.
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue