-
Notifications
You must be signed in to change notification settings - Fork 776
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
Sqlite slasher backend impl #4666
Conversation
…lite-slasher-backend-impl
still some code quality improvements to make here, but the general functionality is all here and the tests are passing |
…lite-slasher-backend-impl
…lite-slasher-backend-impl
…o sqlite-slasher-backend-impl
…lite-slasher-backend-impl
I made some decent progress here. I'm using the rusqlite builtin But theres one issue here that I cant seem to resolve. Rusqlite doesnt seem to play nice in multi threaded situations.
The main issue here is that the sqlite database connection that i set as part of I'm pretty sure I need I experimented with the r2d2 crate to see if I could resolve these compiler errors, but so far thats been a bit of a dead end. I'll keep digging and see if I can come up a solution here |
We use an r2d2 connection pool for sqlite in the validator client, and I'm fairly sure it solves the Send+Sync problem. I'm afk now but can help get that working next week. |
Great to hear about the progress! I'm excited! |
I was able to get batch times down to around 50 seconds by altering two pragma values: Updated metrics: theres a few more tweaks I'll be trying over the following days to hopefully get batch times down further |
my most recent changes have gotten batch times down to around 23 seconds https://snapshots.raintank.io/dashboard/snapshot/hIwPCJmC26Yjg2REEAdb0ueJFPpyNz22 These changes include
There may still be some optimizations to be made in |
closing this for now, I havent been able to get batch times down below 20 seconds. will try revisiting in the future |
Issue Addressed
#4424
Proposed Changes
add sqlite impl to slasher backend
Additional Info
DB Schema
put
function does aINSERT OR REPLACE
to replace value if key already exists