remove the drop_corrupt_tail mechanism, refs #10369 - #10378
Merged
ThomasWaldmann merged 1 commit intoSep 18, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10378 +/- ##
==========================================
- Coverage 88.14% 88.11% -0.03%
==========================================
Files 103 103
Lines 18896 18889 -7
Branches 2931 2929 -2
==========================================
- Hits 16655 16644 -11
- Misses 1557 1561 +4
Partials 684 684 ☔ View full report in Codecov by Harness. |
This was referenced Sep 16, 2026
Contributor
Author
Member
Every check --repair rebuild of the chunk index has an object validator (borgbackup#10369), so drop_corrupt_tail was only reachable from tests. - PackReader.iter_headers: remove the drop_corrupt_tail parameter. Without a validator, a corrupt object header raises IntegrityError. - build_chunkindex_from_repo: remove the drop_corrupt_tail parameter. - Repository: remove chunkindex_drop_corrupt_tail and chunkindex_validate. Since borgbackup#10368 the checker hands its index to the repository, so the lazy .chunks rebuild never runs during a check and nothing set either of them. - ArchiveChecker.check: stop passing drop_corrupt_tail. - tests: remove the 5 tests for drop_corrupt_tail, rewrite test_check_without_repair_does_not_drop_a_pack_tail as test_check_without_key_aborts_on_a_corrupt_pack_header.
mr-raj12
force-pushed
the
remove-drop-corrupt-tail
branch
from
September 18, 2026 04:20
624ccdc to
f8f1464
Compare
Contributor
Author
|
Rebased onto master, both repository attributes are gone now: chunkindex_drop_corrupt_tail and chunkindex_validate, plus the TODO(#10378) note. Since #10368 the checker installs its index into the repository, so the lazy .chunks rebuild never runs during a check and nothing set either attribute. Full suite passes locally on repo v5. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #10369, review point 3. Every
check --repairrebuild of the chunk index now has an object validator, sodrop_corrupt_tailwas only reachable from tests.Depends on #10369. This branch contains its commit; I will rebase onto master after #10369 is merged.
Changes
PackReader.iter_headers(): remove thedrop_corrupt_tailparameter. Without a validator, a corrupt object header raisesIntegrityError.build_chunkindex_from_repo(): remove thedrop_corrupt_tailparameter.Repository: removechunkindex_drop_corrupt_tail.ArchiveChecker.check(): stop passingdrop_corrupt_tail=repairand settingrepository.chunkindex_drop_corrupt_tail.No behaviour change: a walk without a validator only happens in a check without
--repair, and it already raised.Tests
repository_test.py::test_pack_reader_drops_a_corrupt_tail_only_when_askedrepository_test.py::test_pack_reader_drops_a_corrupt_tail_without_an_on_droprepository_test.py::test_pack_reader_drop_corrupt_tail_does_not_affect_a_validating_walkcache_test.py::test_build_chunkindex_without_a_validator_drops_the_rest_of_a_damaged_packcache_test.py::test_build_chunkindex_without_drop_corrupt_tail_raises_on_a_damaged_packcheck_cmd_test.py::test_check_without_repair_does_not_drop_a_pack_tailrenamed totest_check_without_key_aborts_on_a_corrupt_pack_header. It asserts that the rebuild gets no validator and raisesCorruptPack.test_pack_reader_raises_on_bad_magic(raises without a validator) andtest_build_chunkindex_repair_resyncs_after_corrupt_header(CorruptPackwithout a validator; with one, the rebuild skips the damaged object and indexes the next one).TZ=UTC pytest --benchmark-skip -n auto: 3072 passed, 1141 skipped.Note for #10368
#10368 still passes
drop_corrupt_tail=repairand setschunkindex_drop_corrupt_tailinArchiveChecker.check(). Whichever PR merges second removes those two lines.Checklist
master(or maintenance branch if only applicable there)toxor the relevant test subset)