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

irmin-pack: add chunked suffix fields to control file #2117

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

metanivek
Copy link
Member

@metanivek metanivek commented Oct 13, 2022

This PR extends #2115 by adding fields to V4 of the control file needed for a chunked suffix. This is a part of #2096.

The following fields are added:

  • chunk_start_idx to indicate the starting index for the chunks
  • chunk_num to indicate the number of chunks

The following field is added to the Gced status:

  • suffix_dead_bytes to indicate bytes that could not be reclaimed during a GC (because of a suboptimal commit placement or during the time before an existing store has migrated to an optimally chunked suffix) but should be considered dead/unreachable in the suffix. In a future PR, the dispatcher will use this when constructing accessors. It is worth noting that the chunked suffix abstraction can read these bytes still but we would like to enforce reading these bytes from the prefix instead.

@metanivek metanivek added the no-changelog-needed No changelog is needed here label Oct 13, 2022
@metanivek metanivek mentioned this pull request Oct 13, 2022
34 tasks
@metanivek metanivek requested a review from Ngoguey42 October 13, 2022 16:33
@metanivek metanivek added this to the Irmin 3.5 milestone Oct 13, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2022

Codecov Report

Merging #2117 (f29dd16) into main (6854d5b) will increase coverage by 0.09%.
The diff coverage is 85.50%.

@@            Coverage Diff             @@
##             main    #2117      +/-   ##
==========================================
+ Coverage   64.79%   64.89%   +0.09%     
==========================================
  Files         133      134       +1     
  Lines       15890    15952      +62     
==========================================
+ Hits        10296    10352      +56     
- Misses       5594     5600       +6     
Impacted Files Coverage Δ
src/irmin-pack/unix/ext.ml 62.15% <ø> (ø)
src/irmin-pack/unix/import.ml 73.33% <60.00%> (-6.67%) ⬇️
src/irmin-pack/unix/chunked_suffix.ml 84.31% <84.31%> (ø)
src/irmin-pack/unix/control_file.ml 86.00% <100.00%> (+2.00%) ⬆️
src/irmin-pack/unix/control_file_intf.ml 100.00% <100.00%> (+14.28%) ⬆️
src/irmin-pack/unix/file_manager.ml 84.06% <100.00%> (+0.10%) ⬆️
src/irmin-test/store.ml 94.95% <0.00%> (+0.05%) ⬆️
src/irmin-pack/unix/mapping_file.ml 93.87% <0.00%> (+0.12%) ⬆️
src/irmin-pack/layout.ml 82.00% <0.00%> (+0.36%) ⬆️
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@metanivek metanivek force-pushed the chunked_suffix_cf branch 6 times, most recently from 7cb94d2 to c7f88e7 Compare October 20, 2022 13:44
@metanivek metanivek requested a review from icristescu October 20, 2022 14:03
@metanivek metanivek merged commit 22bbfde into mirage:main Oct 21, 2022
@metanivek metanivek deleted the chunked_suffix_cf branch October 21, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog-needed No changelog is needed here
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants