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
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: