Skip to content

recover from "failed to apply delta"

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2t5303: drop "count=1" from corruption ddt/t5303-pack-corruption-resilience.sh+1 -10 replies
2/2unpack_entry: do not die when we fail to apply a deltasha1_file.c t/t5303-pack-corruption-resilience.sh+37 -12 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] recover from "failed to apply delta"
Quoted 10 lines · Nicolas Pitre
Quoted 6 lines

We already handle the case where we were not able to read the delta from disk. However, when we find that the delta we read does not apply, we simply die. This case is harder to trigger, as corruption in the delta data itself would trigger a crc error from zlib. However, a corruption that pointed us at the wrong delta base might cause it.

That makes sense.

Could you produce a test case to go along with this change?

Yes. I was a little worried I would have trouble doing it without relying on a lot of pack internals, but the infrastructure you set up in t5303 makes it relatively easy (and we do not have to make any assumptions that t5303 does not already make).

Here is a re-roll; the first patch is a small cleanup in t5303 that is required for the new tests to work.

[1/2]: t5303: drop "count=1" from corruption dd [2/2]: unpack_entry: do not die when we fail to apply a delta

-Peff