avoid orphan content chunks on BackupOSErrors - #7310
Conversation
|
Note: this likely affects borg 1.x also. But due to the amount of changes, we better do not backport this (esp. considering that orphaned chunks are a harmless issue). |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #7310 +/- ##
==========================================
+ Coverage 83.62% 83.64% +0.01%
==========================================
Files 67 67
Lines 11670 11665 -5
Branches 2125 2121 -4
==========================================
- Hits 9759 9757 -2
Misses 1341 1341
+ Partials 570 567 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
5de081c to
4640ca7
Compare
|
@jdchristensen running your stress test script with code from this branch right now... It worked. Didn't find any orphans nor did anything fail with rc != 0. |
|
The version I last uploaded called the archives "::host*" because I was still using borg1 syntax, so it didn't prune correctly. Here is an updated version, which also includes other features. I ran this for 16 hours without generating any errors. |
if we run into some issue reading an input file, e.g. an I/O error, the BackupOSError exception raised due to that will skip the current file and no archive item will be created for this file. But we maybe have already added some of its content chunks to the repo, we have either written them as new chunks or incref'd some identical chunk in the repo. Added an exception handler that decrefs (and deletes if refcount reaches 0) these chunks again before re-raising the exception, so the repo is in a consistent state again and we do not have orphaned content chunks in the repo.
4640ca7 to
ffe3231
Compare
No description provided.