check: handle Ctrl-C at safe boundaries (#7893) - #9966
Draft
mr-raj12 wants to merge 1 commit into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9966 +/- ##
==========================================
+ Coverage 85.70% 85.71% +0.01%
==========================================
Files 95 95
Lines 16815 16860 +45
Branches 2577 2588 +11
==========================================
+ Hits 14411 14452 +41
- Misses 1668 1671 +3
- Partials 736 737 +1 ☔ View full report in Codecov by Harness. |
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.
borg checkhad no signal handling. The first Ctrl-C did nothing, because nothing polled the soft-interrupt flag, and the second one raised KeyboardInterrupt from wherever execution happened to be. Under--repairthat could land mid-rebuild, or beforefinish()ran, which leaves a stale chunk index behind (#9850).Now the pack scan,
verify_data,rebuild_archives_directoryandrebuild_archiveschecksig_intand stop at a safe boundary: chunk boundaries for the read-only scans, between whole archives for the repair rebuild. The repository check saves its PackTracker so a later run picks up where it left off.finish()runs before we raise either way, so the index and manifest stay consistent. This follows what compact already does (#9890).Includes tests for both the read-only and
--repairinterrupt paths.Fixes #7893.