check: report missing chunks grouped as chunk -> files -> archives, #9218 - #9965
check: report missing chunks grouped as chunk -> files -> archives, #9218#9965mr-raj12 wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9965 +/- ##
==========================================
+ Coverage 86.14% 86.18% +0.03%
==========================================
Files 96 96
Lines 17326 17397 +71
Branches 2649 2668 +19
==========================================
+ Hits 14925 14993 +68
- Misses 1663 1664 +1
- Partials 738 740 +2 ☔ View full report in Codecov by Harness. |
|
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.
64bcae2 to
36b2967
Compare
|
Thanks for the update - the caps, the merged dict, Some remaining points: Blocker: the two new truncation tests fail in binary mode
The binary variants don't run in normal PR CI (only for tag builds and in the nightly canary workflow), which is why this is green here. Two cheap fixes:
The report is lost on Ctrl-C or an exception
Please wrap the loop in The caps bound memory, but not to a small number
Since the grouped report is for humans, considerably lower caps (or an extra global cap on the total number of refs kept) would serve both memory and readability. The Truncation should say how much was dropped
Nit
|
…e a tuple for missing chunk entries, borgbackup#9218
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.