-
Notifications
You must be signed in to change notification settings - Fork 590
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
fix(meta): do not release connection to in-memory SQLite for meta store #19605
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
let conn = sea_orm::Database::connect(IN_MEMORY_STORE).await?; | ||
const IN_MEMORY_STORE: &str = "sqlite::memory:"; | ||
|
||
let mut options = sea_orm::ConnectOptions::new(IN_MEMORY_STORE); |
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.
A more elegant solution might be "Temporary Databases"? No additional options are needed.
https://www.sqlite.org/inmemorydb.html (Scroll down to the "Temporary Databases" section)
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.
Temporary databases are automatically deleted when the connection that created them closes.
Seems that this still holds.
No additional options are needed.
Actually those options are for the connection pool by sqlx
, not SQLite.
6d649e0
to
fb9573e
Compare
613c35c
to
8d1fcec
Compare
fb9573e
to
926ae81
Compare
8d1fcec
to
d0acbe1
Compare
d0acbe1
to
0cb233b
Compare
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Resolve #19522.
The connection options to meta store exposed in #19040 do not apply to in-memory SQLite (typically used by
playground
). Therefore, default values fromsea-orm
orsqlx
were used, wheremax_lifetime
is set to 30 minutes. This means that #19522 will always occur after launchingplayground
and waiting for 30 minutes, no matter whether there is any activity or not.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.