Skip to content

repository: raise PackNotFound when get_many hits a missing pack#9864

Open
mr-raj12 wants to merge 1 commit into
borgbackup:masterfrom
mr-raj12:pack-not-found-exception
Open

repository: raise PackNotFound when get_many hits a missing pack#9864
mr-raj12 wants to merge 1 commit into
borgbackup:masterfrom
mr-raj12:pack-not-found-exception

Conversation

@mr-raj12

@mr-raj12 mr-raj12 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

get_many() now raises PackNotFound instead of ObjectNotFound when a chunk's index entry points at a pack that's missing from the store. That's a different failure than a single missing object: it usually means the index is stale, or we've lost more than one chunk's worth of data. follow up for review comment on #9836.

Added a test for it: delete a pack but leave its index entry, then check PackNotFound fires, and that raise_missing=False still just yields None.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.12%. Comparing base (230f6ef) to head (cbc94ae).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/borg/repository.py 77.77% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9864      +/-   ##
==========================================
+ Coverage   85.09%   85.12%   +0.02%     
==========================================
  Files          93       93              
  Lines       15450    15458       +8     
  Branches     2335     2337       +2     
==========================================
+ Hits        13147    13158      +11     
+ Misses       1604     1599       -5     
- Partials      699      701       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@mr-raj12 mr-raj12 marked this pull request as ready for review July 6, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant