Skip to content

Sqlite DB lock () not getting cleared after execution #620

Open
@NishchithSP

Description

@NishchithSP

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

try{
.
.
.
statement.execute();
statement.clearBindings();
.
catch(){....}
finally{
if (statement != null) statement.close();
}
.

My Get statement

.
.
.
database.rawQuery(sqlStatement, null);
.
.

My version

implementation 'net.zetetic:android-database-sqlcipher:4.5.3@aar'
implementation "androidx.sqlite:sqlite:2.3.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions