Conversation
…orgbackup#10364 The repository uses the index ArchiveChecker builds instead of loading or building a second one.
A check without --repair uses the index the repository check loaded. Tighten the comments.
Mark the index invalid before verify_data() deletes, flush before using the index, never store the checker's index at close().
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10379 +/- ##
==========================================
+ Coverage 88.12% 88.14% +0.02%
==========================================
Files 103 103
Lines 18928 18910 -18
Branches 2923 2928 +5
==========================================
- Hits 16681 16669 -12
- Misses 1556 1557 +1
+ Partials 691 684 -7 ☔ View full report in Codecov by Harness. |
…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 16, 2026 13:29
0a6e74a to
74fcb2b
Compare
33 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
Refs #8466, item 2 of #10318. Based on #10368, 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. SoArchiveChecker.finish()no longer rebuilds the index from all packs after a repair that changed packs. It re-reads only the packs the repair wrote.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()flushes beforeArchives.create(), which flushes and discards the results.verify_written_packs()walks each written pack with a validator and compares it with the index:check()built the index without a validator (the key could not be read),finish()still rebuilds the index from all packs with a validator.finish()drops the index in one place for both paths (invalidate_chunk_index()andself.chunks = None), before the full rebuild.Repository.flush()returns the pack writer's flush results.Tests (
check_cmd_test.py):finish()reads only the rewritten pack, the packsput()wrote, and the pack its ownflush()stores.finish()rebuilds from all packs.delete()drops the pack andfinish()re-reads no pack.test_check_holds_a_single_chunk_index: a case for the full rebuild infinish(), asserting the checker's index is freed first.Tests (
repository_test.py):flush()returns the stored objects, or None with nothing buffered or no pack writer.Full test suite: 3093 passed, 1142 skipped.
Checklist
master(or maintenance branch if only applicable there)toxor the relevant test subset)