Skip to content
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

Bug: Do not assume db file still exists after release and on reconnect #1674

Open
insipx opened this issue Feb 27, 2025 · 0 comments · May be fixed by #1692
Open

Bug: Do not assume db file still exists after release and on reconnect #1674

insipx opened this issue Feb 27, 2025 · 0 comments · May be fixed by #1692
Labels
bug Something isn't working

Comments

@insipx
Copy link
Contributor

insipx commented Feb 27, 2025

on reconnect we assume the same database + salt etc. still exists, and use the same salt and file. We cannot assume this, and should instead completely re-instantiate the db especially ensuring we call EncryptedConnection::new in order to re-create the database file & SqlCipher salt in case the db was deleted. Should also make sure that the pool and write_conn are both properly re-instantiated.

Failure to do these checks/re instantiate could mean we point to a db file that no longer exists. Worse, if we were in a transaction before the release, we may try to write to a non-existent file since we do not release the write connection currently.

@insipx insipx added the bug Something isn't working label Feb 27, 2025
@insipx insipx linked a pull request Mar 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant