Skip to content

Chunker: split file reading and chunking#8881

Closed
ThomasWaldmann wants to merge 3 commits intoborgbackup:masterfrom
ThomasWaldmann:chunker-refactor
Closed

Chunker: split file reading and chunking#8881
ThomasWaldmann wants to merge 3 commits intoborgbackup:masterfrom
ThomasWaldmann:chunker-refactor

Conversation

@ThomasWaldmann
Copy link
Copy Markdown
Member

@ThomasWaldmann ThomasWaldmann commented May 25, 2025

  • code much nicer now, less C, better separation
  • FileReader has all the file reading code, including sparse/fmap and fadvise support, using a very similar API as the chunkers
  • ChunkerFixed works (it is only a rather thin wrapper so the file reading blocksize of FileReader can be a multiple of the blocksize of the ChunkerFixed)
  • the (buzhash) Chunker refactor and transformation to mostly Cython (3rd commit) broke it, why?

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.47%. Comparing base (7072f62) to head (15f8115).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8881      +/-   ##
==========================================
+ Coverage   82.17%   82.47%   +0.30%     
==========================================
  Files          74       74              
  Lines       13367    13367              
  Branches     1977     1977              
==========================================
+ Hits        10984    11025      +41     
+ Misses       1713     1682      -31     
+ Partials      670      660      -10     

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

Replaced `ChunkerFixed`'s block-reading functionality with a new `FileReader` class to streamline code and improve separation of concerns. Adjusted `ChunkerFixed` to delegate file reading to `FileReader` while focusing on chunk assembly.

`FileReader` is intended to be useful for other chunkers also,
so they can easily implement sparse file reading / fmap support.
@ThomasWaldmann ThomasWaldmann marked this pull request as draft May 25, 2025 00:52
@ThomasWaldmann
Copy link
Copy Markdown
Member Author

superseded by #8883

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