Add progress indicator to repository check loop
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 875
- Avg merge
- 12h 37m
- Merged PRs (30d)
- 199
Description
The `Repository.check()` method in `src/borg/repository.py` (line 319) has an existing TODO comment for a progress indicator, but it has not been implemented.
For large repositories, the repository check loop iterates over all data objects, loading and verifying checksums for each one. This can take many hours with no user-visible progress output - only a raw key checkpoint is logged every 5 minutes (line 390-392).
`ProgressIndicatorPercent` is already used in several other places in the codebase (`compact_cmd.py`, `archive.py`, `analyze_cmd.py`), so the pattern is well established.
### Proposed change
Add a `ProgressIndicatorPercent` to the `check()` loop in `Repository`, showing the user a percentage/count as objects are verified. The total object count could be obtained via `store.list()` or a pre-count step.
### Related
- `# TODO: progress indicator, ...` at `src/borg/repository.py:319`
- #8996 - user unable to distinguish a working check from a frozen process
- #8009 - similar request for segment check progress (borg 1.x)
Contributor guide
Assessment
This issue has not been assessed yet.