Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10379 +/- ##
==========================================
- Coverage 88.14% 85.65% -2.49%
==========================================
Files 103 103
Lines 18896 18946 +50
Branches 2931 2944 +13
==========================================
- Hits 16655 16228 -427
- Misses 1557 2047 +490
+ Partials 684 671 -13 ☔ View full report in Codecov by Harness. |
mr-raj12
force-pushed
the
check-finish-narrow-walk-8466
branch
from
September 16, 2026 13:29
0a6e74a to
74fcb2b
Compare
33 tasks
mr-raj12
force-pushed
the
check-finish-narrow-walk-8466
branch
from
September 17, 2026 11:57
74fcb2b to
c25f8d1
Compare
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
check-finish-narrow-walk-8466
branch
from
September 18, 2026 04:42
c25f8d1 to
84a6388
Compare
…kup#8466 finish() validates the written packs against the shared index instead of rebuilding it from all packs.
mr-raj12
force-pushed
the
check-finish-narrow-walk-8466
branch
from
September 18, 2026 04:58
84a6388 to
8903d7d
Compare
mr-raj12
marked this pull request as ready for review
September 18, 2026 04:58
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
Refs #8466, item 2 of #10318. Based on #10378, only the last commit is new.
With #10368 the checker and the repository share one chunk index, and
put()/delete()update it for every pack they write.ArchiveChecker.finish()stores that index and re-reads only the packs the repair wrote, to confirm the index matches them.ArchiveCheckerrecords the packs repair writes inwritten_packs: from theput()andflush()results, and fromdelete(), which now returnscompact_pack()'s(new_pack_id, dropped_bytes). A pack rewritten again is replaced by its new pack.create_archive_entry()stores the pack writer buffer and records its packs, then creates the archives directory entry.verify_written_packs()reads the object headers of each written pack with a validator and compares them with the index entries that name the pack:compact_packcopies one into the new pack when it lies in a byte range no index entry coversfinish()stores the index, then drops the in-memory one (invalidate_chunk_index()andself.chunks = None), becauseclose()would persist it over the index just stored.check()asserts that a repair has a validator, so every object it indexes is checked.Repository.flush()returns the objects of the packs it stored,Noneif it stored none.Tests (
check_cmd_test.py), each asserting which packsfinish()walks:delete()wrote, with more than ten packs in the repositorydelete()drops the pack and writes noneput()wrotefinish()'s ownflush()storestest_check_holds_a_single_chunk_index: the--repaircase builds one index in the checker, not twotest_check_repair_stopped_in_the_index_store_marks_the_index_invalid: renamed,finish()stores the index instead of rebuilding itTests (
repository_test.py):flush()returns the stored objects,Nonewith nothing buffered or no pack writer.Checklist
master(or maintenance branch if only applicable there)toxor the relevant test subset)