-
Notifications
You must be signed in to change notification settings - Fork 138
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
deadpool-sqlite: in-memory DB not actually shared? #213
Comments
I don't know how to reliably reproduce this, but it seems like if I |
Never mind. It is actually SQLite connection URI's problem: I used Obviously, this works only for one process. |
That behavior is indeed expected with a I just checked and May I ask what you're actually trying to do? It almost sounds like a full fledged DB (like PostgreSQL) or none at all would be better suited for your use-case. |
I am actually just tryinig to use an in-memory database in an async server. I encountered issue when sometimes the deadpool connection gives an empty DB instead of the one initialized. I understand that this is expected now. I solved it by using the mentioned URL -- multiple connections to the shared memory URL would use the same in-memory database. |
You can modify some of the config via the There is currently no way to pass A PR for this feature would be highly appreciated. 👍 |
I didn't get what |
Kind of, yes. You can either pass a You can find an example how it can be used in the tests: https://github.com/bikeshedder/deadpool/blob/master/tests/managed_hooks.rs Please note that the signature will change in the next release of deadpool: |
OK, I will give it a try. Though I generally just |
Closing this as invalid as it is not a Maybe future versions should raise an error or log a warning at least when trying to use a I opened a new tracking issue for the open flags and vfs parameter: |
It seems like in-memory databases are not actually connected to the same one. For whatever reason, I don't see the tables created previously when I try to use a connection later. A file-based DB does work.
The text was updated successfully, but these errors were encountered: