-
Notifications
You must be signed in to change notification settings - Fork 157
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: Use temp control files upon writing #2206
Conversation
Codecov Report
📣 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 #2206 +/- ##
==========================================
- Coverage 68.04% 68.04% -0.01%
==========================================
Files 135 135
Lines 16378 16390 +12
==========================================
+ Hits 11144 11152 +8
- Misses 5234 5238 +4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thanks for looking into this! |
048cd9c
to
9350821
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this! Left some comments for consideration. I agree with @art-w that we should run a bigger benchmark to test these changes before merging.
a036b04
to
44c80c3
Compare
Finally ran the replay trace thx to the help of @art-w & @adatario, here are the results:
|
I think there was a bug in the replay that caused a wrong version of Irmin to be used. This was a mistake on my side. The stats above should not be considered accurate. I'm re-running the benchmarks. |
Here's the stats.txt for another benchmark run where the correct version (this PR commit) was used:
|
Nice, thx a lot, it should be good to merge now |
@adatario thanks for running the benchmark! Do you have the full stats.txt? I'd like to see some of the more detailed stats around commit times. |
Yes, they are in the |
Thanks @adatario! These are the lines I wanted to look at:
There is a slight overhead on average for commit (we write the control file on every commit), but it is very small. I think this change is good to go! 🎉 |
This PR changes the writing of control files: They were currently updated while making the assumption that the file itself being smaller than a page, the writing would be atomic. However it was deemed dubious that we could use such an assumption.
This is why this PR:
.tmp
).Io
file stored in theControl_file.t
with the newThis leaves however one question in the case of RO instances:
Because we open a new
Io
each time we want to reload the payload, storing said Io has currently purpose. Maybe we could do something about that (separating RO & RW control files ? Using an option ? Remove the reload function ?)