mirage / irmin

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

irmin-pack: fix v2 lower migration #2241

Closed metanivek closed 1 year ago

metanivek commented 1 year ago

Previously we did not take the dead header of the dict into account when performing a lower layer migration for older stores. This commit fixes this issue by removing the dead header from the dict during the migration.

I also added some tests for v3 stores and updated migration tests to ensuring reading contents after a migration works. These tests all passed anyway, but thought it didn't hurt for completeness against potential future changes.

codecov-commenter commented 1 year ago

Codecov Report

Merging #2241 (0225111) into main (4c38a4b) will increase coverage by 0.02%. The diff coverage is 80.00%.

:exclamation: Current head 0225111 differs from pull request most recent head fffa054. Consider uploading reports for the commit fffa054 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    #2241      +/-   ##
==========================================
+ Coverage   67.93%   67.96%   +0.02%     
==========================================
  Files         136      136              
  Lines       16603    16621      +18     
==========================================
+ Hits        11279    11296      +17     
- Misses       5324     5325       +1     
Impacted Files Coverage Δ
src/irmin-pack/unix/gc.ml 69.79% <0.00%> (-3.62%) :arrow_down:
src/irmin-pack/unix/file_manager.ml 85.78% <100.00%> (+0.79%) :arrow_up:

... and 1 file with indirect coverage changes

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