-
-
Notifications
You must be signed in to change notification settings - Fork 762
Item: remove .chunks_healthy, fixes #8559 #8568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ThomasWaldmann
merged 5 commits into
borgbackup:master
from
ThomasWaldmann:remove-chunks-healthy
Apr 11, 2025
Merged
Item: remove .chunks_healthy, fixes #8559 #8568
ThomasWaldmann
merged 5 commits into
borgbackup:master
from
ThomasWaldmann:remove-chunks-healthy
Apr 11, 2025
Conversation
This file contains 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
88fe437
to
9ed75ca
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8568 +/- ##
==========================================
+ Coverage 81.81% 81.91% +0.09%
==========================================
Files 74 74
Lines 13348 13313 -35
Branches 1971 1964 -7
==========================================
- Hits 10921 10905 -16
+ Misses 1761 1748 -13
+ Partials 666 660 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b0b3455
to
d99598c
Compare
2a7df01
to
69d504d
Compare
69d504d
to
8c4890e
Compare
a89001d
to
56eca9d
Compare
Well, it's not totally removed, some code in Item, Archive and borg transfer --from-borg1 needs to stay in place, so that we can pick the CORRECT chunks list that is in .chunks_healthy for all-zero-replacement-chunk-patched items when transferring archives from borg1 to borg2 repos. transfer: do not transfer replacement chunks, deal with missing chunks in other_repo FUSE fs read: IOError or all-zero result
it now takes either: - a list of ChunkListEntry namedtuples - a list of chunk IDs [bytes]
preloading: always use raise_missing=False, because the behaviour is defined at preloading time. fetch_many: use get_many with raise_missing=False. if get_many yields None instead of the expected chunk cdata bytes, on-the-fly create an all-zero replacement chunk of the correct size (if the size is known) and emit an error msg about the missing chunk id / size. note: for borg recreate with re-chunking this is a bit unpretty, because it will transform a missing chunk into a zero bytes range in the target file in the recreated archive. it will emit an error message at recreate time, but afterwards the recreated archive will not "know" about the problem any more and will just have that zero-patched file. so guess borg recreate with re-chunking should better only be used on repos that do not miss chunks.
Sometimes, usually for file content chunks, it makes sense to generate all-zero replacement chunks on-the-fly. But for e.g. an archive items metadata stream, this does not make sense (because it wants to msgpack.unpack the data), so we rather want None. In that case, we do not have the size information anyway.
3229f98
to
3fdf7a3
Compare
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.
Well, it's not totally removed, some code in
Item
,archive
andborg transfer --from-borg1
needs to stay in place, so that we can pick the CORRECT chunks list that is in.chunks_healthy
for all-zero-replacement-chunk-patched items when transferring archives from borg1 to borg2 repos.FUSE fs read: IOError or all-zero result (depending on allow_damaged_files option)
extract, diff, ...: fetch_many() will on-the-fly create all-zero replacement chunks (of correct size, if size is known) if it gets a None result (not: bytes chunk cdata) from repo.get() because a chunk is missing. it will also emit an ERROR about the missing chunk, with chunk id and size.
Also fixes: #8562