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
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).Iofile stored in theControl_file.twith the newThis leaves however one question in the case of RO instances:
Because we open a new
Ioeach 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 ?)