mirage / irmin

Irmin is a distributed database that follows the same design principles as Git
https://irmin.org
ISC License
1.84k stars 153 forks source link

irmin-pack: fix read object headers from lower volumes #2204

Closed art-w closed 1 year ago

art-w commented 1 year ago

I ran into this edge-case when testing the fast migration to a lower volume. The children objects' headers are read with read_range_exn which only supported reading from the upper store. (cc @Firobe as this should also be useful for #2202)

metanivek commented 1 year ago

Merge when green! (but looks like there is a small build issue on CI atm)

codecov-commenter commented 1 year ago

Codecov Report

Merging #2204 (38de2a1) into main (eddf517) will decrease coverage by 0.02%. The diff coverage is 85.29%.

:exclamation: Current head 38de2a1 differs from pull request most recent head b63b5d7. Consider uploading reports for the commit b63b5d7 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #2204      +/-   ##
==========================================
- Coverage   68.04%   68.02%   -0.02%     
==========================================
  Files         135      135              
  Lines       16378    16379       +1     
==========================================
- Hits        11144    11142       -2     
- Misses       5234     5237       +3     
Impacted Files Coverage Δ
src/irmin-pack/unix/pack_store.ml 79.12% <71.42%> (+0.10%) :arrow_up:
src/irmin-pack/unix/dispatcher.ml 57.69% <75.00%> (-2.31%) :arrow_down:
src/irmin-pack/unix/utils.ml 89.65% <92.85%> (-3.21%) :arrow_down:
src/irmin-pack/unix/lower.ml 70.00% <100.00%> (+0.30%) :arrow_up:
src/irmin-pack/unix/sparse_file.ml 76.85% <100.00%> (-1.86%) :arrow_down:
src/irmin-pack/unix/traverse_pack_file.ml 68.82% <100.00%> (ø)
src/irmin-pack/unix/chunked_suffix.ml 85.96% <0.00%> (+0.87%) :arrow_up:

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