check: report missing chunks grouped as chunk -> files -> archives, #9218 - #9965
Open
mr-raj12 wants to merge 2 commits into
Open
check: report missing chunks grouped as chunk -> files -> archives, #9218#9965mr-raj12 wants to merge 2 commits into
mr-raj12 wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9965 +/- ##
==========================================
- Coverage 85.70% 85.68% -0.03%
==========================================
Files 95 95
Lines 16815 16902 +87
Branches 2577 2591 +14
==========================================
+ Hits 14411 14482 +71
- Misses 1668 1684 +16
Partials 736 736 ☔ View full report in Codecov by Harness. |
Member
|
So, did you ask claude for a review? |
…orgbackup#9218 Cap distinct chunks and file refs kept for the end-of-run report, combine the two collection dicts into one, and add tests for the grouping and truncation.
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.
Fixes #9218.
borg checklogged one line per (archive, file, chunk) for each missing file chunk. Now it groups by chunk:For each missing chunk you see its size, the files that reference it, and the archives each file is in. The old per-chunk line (with byte offsets) is now logged at debug level.
The report is collected while checking the archives and printed once they have all been analyzed. As a check can run against a badly damaged repository with very many missing chunks, the collection is bounded by
ArchiveChecker.MAX_MISSING_CHUNKS(distinct chunks) andMAX_REFS_PER_CHUNK(files per chunk); the report notes when either limit truncated it.Tests in
check_cmd_test.pycover the grouping (one chunk reported once, listing multiple files and archives) and the truncation.