-
Notifications
You must be signed in to change notification settings - Fork 567
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
Sqlite DB lock () not getting cleared after execution #620
Comments
Hi @NishchithSP, Please create a small reproduction of the behavior using the SQLCipher for Android test suite. I suspect you may have another thread within your application that has acquired the lock if |
There may be another thread obtaining lock when we execute multiple queries, But the problem is this lock is never cleared. Once lock is obtained by sql statement it is supposed to clear the lock after execution. |
Hello @NishchithSP, Is this behavior something you can reproduce with a new test within the SQLCipher for Android test suite? |
This cannot be simulated inside test suite. This is happening in one of our android application. As explained theoretically it should not happen as DB should release the lock once operation is done. I am looking for information regarding any edge cases or any loopholes that's have been discovered in the past to investigate similar things. |
Hi @NishchithSP, We've had no reports of the lock not being released in that type of use case. We agree that should not happen, but would need a reproducible case to investigate further. |
I am running a DB update via SQL
statement.execute()
and clearing all bindings. Once this is done I am trying to read same table.Ideally DB lock the database and clears the lock once statement is executed.
But db seems to be not clearing it as I am unbale to read the DB.
database.isDbLockedByOtherThreads()
is giving me true even taough all write/update operation is completed. This never ends and hence app is stuck and cannot do any more db operations.My update Statement
My Get statement
My version
The text was updated successfully, but these errors were encountered: