-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Replace r2d2 with tokio-rusqlite #4052
Comments
Connection pool approach uses the fact that
With the "worker thread" approach it is even possible to distribute the work across several connections so long requests like selecting a whole chat do not stall short requests like loading the group name. However, If we want to implement async API for |
Since I wrote that comment I'm not sure it's an entirely correct statement, I think we might benefit from multiple connections to some degree. Since we can have several connections reading at the same time. I'm not really sure how common it is for the UI's to be calling core APIs concurrently, but they could. Your description here of tokio-rusqlite does not make it sound like it will be necessarily better than the pool you've implemented in #4053. To me it seems more like something that would need to be tested and measured. Are you convinced it's worth trying this direction further? |
I would still like to merge #4055 that removes Ideally |
I discovered tokio-rusqlite via the comment in rusqlite repository. It does what @flub proposed at #4050 (review).
This will solve r2d2 problems we have with closing database connection, causing #4049, 4051 and random python tests import/export failures (#4046).
The text was updated successfully, but these errors were encountered: