Skip to content

ChunkIndexEntry.refcount -> .flags#8513

Merged
ThomasWaldmann merged 4 commits into
borgbackup:masterfrom
ThomasWaldmann:refcount-becomes-flags
Nov 2, 2024
Merged

ChunkIndexEntry.refcount -> .flags#8513
ThomasWaldmann merged 4 commits into
borgbackup:masterfrom
ThomasWaldmann:refcount-becomes-flags

Conversation

@ThomasWaldmann

Copy link
Copy Markdown
Member

Make better use of these 32bits.

We gave up refcounting quite a while ago and are only interested
in whether a chunk is used (referenced) or not (orphan).

So, let's keep that uint32_t value, but use it for bit flags, so
we could use it to efficiently remember other chunk-related stuff also.
we changed the semantics (and name) of the first tuple element:
refcount -> flags

thus, better invalidate existing cache.
@codecov

codecov Bot commented Nov 1, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.76%. Comparing base (de1b7e0) to head (8a13cf2).
Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8513      +/-   ##
==========================================
+ Coverage   81.72%   81.76%   +0.04%     
==========================================
  Files          73       73              
  Lines       13109    13140      +31     
  Branches     1924     1926       +2     
==========================================
+ Hits        10713    10744      +31     
  Misses       1740     1740              
  Partials      656      656              

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

@ThomasWaldmann ThomasWaldmann merged commit 59459af into borgbackup:master Nov 2, 2024
@ThomasWaldmann ThomasWaldmann deleted the refcount-becomes-flags branch November 2, 2024 01:33
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