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: allow to keep tree caches after a commit #2225

Closed samoht closed 1 year ago

samoht commented 1 year ago

Expose the clear flag threaded through to Tree.export.

With this, usingS.set_tree_exn ~clear:fase in https://gitlab.com/tezos/tezos/-/merge_requests/8169 seems to fix the issue.

It's also unclear what the default should be - There's an explicit Tree.clear for those who really want to clear the caches, so maybe by default, we should have clear=false?

codecov-commenter commented 1 year ago

Codecov Report

Merging #2225 (d6644ee) into main (8eeffae) will decrease coverage by 0.01%. The diff coverage is 66.66%.

:exclamation: Current head d6644ee differs from pull request most recent head 9d04fc6. Consider uploading reports for the commit 9d04fc6 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    #2225      +/-   ##
==========================================
- Coverage   68.09%   68.09%   -0.01%     
==========================================
  Files         135      135              
  Lines       16480    16484       +4     
==========================================
+ Hits        11222    11224       +2     
- Misses       5258     5260       +2     
Impacted Files Coverage Δ
src/irmin/store.ml 66.23% <65.71%> (+<0.01%) :arrow_up:
src/irmin/tree.ml 81.07% <100.00%> (-0.21%) :arrow_down:

... and 2 files with indirect coverage changes

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

samoht commented 1 year ago

I've added some documentation and tests. It needs #2227 to be able to compare repository configurations in a finer grain as before (as previously we would always cleanup these fields after an export)