Skip to content
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

chunk index cache: use cache/chunks.<HASH>, see #8503 #8531

Merged
merged 5 commits into from
Nov 11, 2024

Conversation

ThomasWaldmann
Copy link
Member

@ThomasWaldmann ThomasWaldmann commented Nov 8, 2024

this should fix the cache coherency issue when running (and finishing normally) multiple backups in parallel. if another backup then starts at any time, it will merge all already cached chunk indexes before beginning to process files.

Improvements:

  • doesn't need a separate file for the hash
  • multiple borg running in parallel don't overwrite the other's chunk indexes
  • when loading the chunk index from the cache, just merge all we have there
  • we can later write multiple partial chunkindexes to the cache

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 86.41975% with 11 lines in your changes missing coverage. Please review.

Project coverage is 81.80%. Comparing base (38ba3d8) to head (56493fc).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
src/borg/cache.py 85.52% 7 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8531      +/-   ##
==========================================
+ Coverage   81.75%   81.80%   +0.04%     
==========================================
  Files          74       74              
  Lines       13240    13281      +41     
  Branches     1941     1955      +14     
==========================================
+ Hits        10824    10864      +40     
- Misses       1753     1754       +1     
  Partials      663      663              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- doesn't need a separate file for the hash
- we can later write multiple partial chunkindexes to the cache

also:

add upgrade code that renames the cache from previous borg versions.
nice try, but due to other changes after b13, the cache is invalid anyway.
@ThomasWaldmann ThomasWaldmann merged commit d266b2f into borgbackup:master Nov 11, 2024
16 checks passed
@ThomasWaldmann ThomasWaldmann deleted the chunkindex branch November 11, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant