-
-
Notifications
You must be signed in to change notification settings - Fork 742
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
Merged
ThomasWaldmann
merged 4 commits into
borgbackup:master
from
ThomasWaldmann:files-cache-from-archive
Sep 21, 2024
Merged
files cache improvements #8389
ThomasWaldmann
merged 4 commits into
borgbackup:master
from
ThomasWaldmann:files-cache-from-archive
Sep 21, 2024
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.12%
==========================================
Files 70 70
Lines 12717 12733 +16
Branches 2297 2310 +13
==========================================
- Hits 10370 10369 -1
- Misses 1694 1707 +13
- Partials 653 657 +4 ☔ 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
2 times, most recently
from
September 21, 2024 09:12
341f02d
to
28b2a09
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.
we discard all files cache entries referring to files with timestamps AFTER we started the backup. so, even in case we would back up an inconsistent file that has been changed while we backed it up, we would not have a files cache entry for it and would fully read/chunk/hash it again in next backup.
ThomasWaldmann
force-pushed
the
files-cache-from-archive
branch
from
September 21, 2024 09:40
28b2a09
to
ec9d412
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.
Fixes #8385.