-
-
Notifications
You must be signed in to change notification settings - Fork 741
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
files cache improvements #8389
Open
ThomasWaldmann
wants to merge
3
commits into
borgbackup:master
Choose a base branch
from
ThomasWaldmann:files-cache-from-archive
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
files cache improvements #8389
ThomasWaldmann
wants to merge
3
commits into
borgbackup:master
from
ThomasWaldmann:files-cache-from-archive
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
ThomasWaldmann
force-pushed
the
files-cache-from-archive
branch
from
September 18, 2024 15:23
04ffe46
to
f2e2850
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8389 +/- ##
==========================================
- Coverage 81.54% 81.43% -0.11%
==========================================
Files 70 70
Lines 12717 12712 -5
Branches 2297 2306 +9
==========================================
- Hits 10370 10352 -18
- Misses 1694 1704 +10
- Partials 653 656 +3 ☔ View full report in Codecov by Sentry. |
ThomasWaldmann
force-pushed
the
files-cache-from-archive
branch
3 times, most recently
from
September 19, 2024 19:39
8456761
to
219a47a
Compare
ThomasWaldmann
changed the title
replace files cache by reading previous archive
files cache improvements
Sep 19, 2024
ThomasWaldmann
force-pushed
the
files-cache-from-archive
branch
2 times, most recently
from
September 19, 2024 21:43
f1b3c5c
to
f452b97
Compare
- changes to locally stored files cache: - store as files.<H(archive_name)> - user can manually control suffix via env var - if local files cache is not found, build from previous archive. - enable rebuilding the files cache via loading the previous archive's metadata from the repo (better than starting with empty files cache and needing to read/chunk/hash all files). previous archive == same archive name, latest timestamp in repo. - remove AdHocCache (not needed any more, slow) - remove BORG_CACHE_IMPL, we only have one - remove cache lock (this was blocking parallel backups to same repo from same machine/user). Cache entries now have ctime AND mtime. Note: TTL and age still needed for discarding removed files. But due to the separate files caches per series, the TTL was lowered to 2 (from 20).
ThomasWaldmann
force-pushed
the
files-cache-from-archive
branch
from
September 19, 2024 22:48
f452b97
to
c100e7b
Compare
if we detect the conditions for this (rare) race, abort reading the file and retry. The caller (_process_any) will do up to MAX_RETRIES before giving up. If it gives up, a warning is logged and the file is not written to the archive and won't be memorized in the files cache either. Thus, the file will be read/chunked/hashed again at the next borg create run.
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.
Fixes #8385.