You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There doesn't seem a way to explicitly disconnect from the database, which means if using local file system (rocksdb://), the database will stay locked and be unusable for as long as the program runs.
I'm working on an electron application, using the database from a preload script to have it be isolated, and each refresh also reloads the preload script, which makes it try to connect again. But since the process itself isn't destroyed, the value in rust is never dropped, or at least not in a reasonable timeframe.
I don't know much about napi, but maybe it's a simple case of adding a disconnect method that consumes self, i.e.
surrealdb.node/src/lib.rs
#[napi]pubfndisconnect(self) -> Result<()>{}
The text was updated successfully, but these errors were encountered:
There doesn't seem a way to explicitly disconnect from the database, which means if using local file system (rocksdb://), the database will stay locked and be unusable for as long as the program runs.
I'm working on an electron application, using the database from a preload script to have it be isolated, and each refresh also reloads the preload script, which makes it try to connect again. But since the process itself isn't destroyed, the value in rust is never dropped, or at least not in a reasonable timeframe.
I don't know much about napi, but maybe it's a simple case of adding a disconnect method that consumes self, i.e.
surrealdb.node/src/lib.rs
The text was updated successfully, but these errors were encountered: