WIP: Close sqlite pool before returning
Our sqlite db recovery strategies don't work on Windows because the OS prevents moving the already open file. This PR attempts to address this and in principle it attempts to close all connections to the database and ensure that sqlx relinquishes the access to db file(s).
Short summary of what this PR introduces:
- Close sqlx connection pools in order to close/release the db file
- Poll for file db file closure before renaming the corrupt db file. See: https://github.com/launchbadge/sqlx/issues/3217
What I am looking to fix in the next week:
Add a companion helper for Pool<Sqlite> that would not only close the connection pool but also poll for a bit until the file is actually closed.
JIRA-VPN-1471
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| nym-explorer-v2 | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 12, 2025 1:45pm |
2 Skipped Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs-nextra | ⬜️ Ignored (Inspect) | Visit Preview | Jun 12, 2025 1:45pm | |
| nym-next-explorer | ⬜️ Ignored (Inspect) | Visit Preview | Jun 12, 2025 1:45pm |
looks good provided you tested this
It's tested. Also there is a test that you can run.
seems you might have to do some additional feature-locking because mio is pulled into wasm build (from my experience, in 99.9% cases it's due to one of tokio's features)
seems you might have to do some additional feature-locking because
miois pulled into wasm build (from my experience, in 99.9% cases it's due to one of tokio's features)
Fixed 👍
We'll conduct a bit of testing in nym-vpn-client before merging this. Thank you for reviewing this work.