-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update Datastore Dependency & Fix Badger Slow Tests #6
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
==========================================
+ Coverage 76.50% 76.86% +0.36%
==========================================
Files 2 2
Lines 434 432 -2
==========================================
Hits 332 332
+ Misses 78 76 -2
Partials 24 24
Continue to review full report at Codecov.
|
Hey! I work on badger. Could you please point me to slow badger tests? I can help fix them. |
I see that you have test that do something like
The single-entry transactions are known to be super slow. The reason being that every transaction has to be persisted to the disk. If you have many small transactions, it would mean there will be many small Badger has a |
@jarifibrahim hey thanks for the response, this badger datastore is basically verbatim of https://github.com/ipfs/go-ds-badger except for badgerv2 and removal of Based on your comment however it looks like there's room for more improvement within badger.
Interesting, I did not know this, I will investigate this and see if the @xiegeo I'm going to drop this PR back into draft mode until I can implement the suggestions by Ibrahim |
IMO, using async just for testing is fine. |
I agree with @xiegeo, unless you're trying to test some odd data consistency issues, |
Makes sense, I will mark PR as ready and the suggestions you made about how to use batch can be done in a separate PR |
Upgrading
ipfs/go-datastore
to v0.4.4 from v0.3.1 caused this issue to come up. The solution to that was to enable async writes. I've only enabled async writes within the test, because I don't think defaulting to that is a good idea as it increases the risk fo data loss.There are also reports of windows being faster than linux, however this is because windows ignores they sync flag