Repository navigation
recreate: keep chunker_params if not rechunkifying, fixes #10127 - #10130
Merged
ThomasWaldmann merged 1 commit intoAug 16, 2026
Merged
ThomasWaldmann merged 1 commit into
ThomasWaldmann merged 1 commit into
Conversation
…10127 If no --chunker-params was given, borg recreate does not rechunk, so the target archive keeps the source archive's chunks. But it still recorded the default chunker params in the target archive's metadata, so e.g. "borg recreate --comment ..." of an archive created with non-default chunker params claimed the default params afterwards. Now the target archive inherits the source archive's chunker params (if they are known) unless we actually rechunkify. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 1.4-maint #10130 +/- ##
=============================================
+ Coverage 82.10% 82.13% +0.02%
=============================================
Files 38 38
Lines 11435 11435
Branches 1802 1802
=============================================
+ Hits 9389 9392 +3
+ Misses 1461 1459 -2
+ Partials 585 584 -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.
If no
--chunker-paramswas given,borg recreatedoes not rechunk, so the target archive keeps the source archive's chunks. But it still recorded the default chunker params in the target archive's metadata: after e.g.an archive created with
--chunker-params=buzhash,10,23,16,4095claimedbuzhash,19,23,21,4095inborg info --json, although its chunks were still the original ones.Now
ArchiveRecreater.create_targetcomputes the target chunker params first: if we rechunkify, the new params are used (and recorded, as before); otherwise the target inherits the source archive's chunker params, so the metadata keeps describing how the chunks were actually made. If the source archive has no chunker params in its metadata (very old archives), we fall back to the defaults as before.Added a regression test that checks the recorded chunker params after recreating with and without
--chunker-params.