-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Remove r2d2_sqlite dependency #4050
Conversation
The whole r2r2 connection pool is an overkill for DC usage. Not being able to reliably close the database due to a long-standing issue sfackler/r2d2#99 causes problems like #4049 where the test migrates the database before it is closed and cannot determine when it will be closed. |
c2e75e0
to
aaa5ece
Compare
aaa5ece
to
870527d
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.
It'd be nice to get rid of r2d2 entirely someday. We really don't get any benefit out of multiple connections and may as well have a single tokio task that handles all the Db requests communicating over some channels. But that's just dreaming of the future.
|
||
/// SQLCipher database passphrase. | ||
/// Empty string if database is not encrypted. | ||
passphrase: String, |
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.
Unfortunate that we need to keep this in memory the whole time.
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.
This is also because of r2d2 abstraction, it expects that connections may fail because underlying network connections fail, and have to be reestablished. Which is not the case with SQLite.
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.
Fixed in #4053.
This is what |
No description provided.