Animesh Sahu
11/27/2019, 8:49 AMException in thread "DefaultDispatcher-worker-7 @coroutine#49" org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
at org.sqlite.core.DB.newSQLException(DB.java:941)
at org.sqlite.core.DB.newSQLException(DB.java:953)
at org.sqlite.core.DB.throwex(DB.java:918)
at org.sqlite.core.DB.exec(DB.java:178)
at org.sqlite.SQLiteConnection.commit(SQLiteConnection.java:404)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManager$ThreadLocalTransaction.commit(ThreadLocalTransactionManager.kt:57)
at org.jetbrains.exposed.sql.Transaction.commit(Transaction.kt:66)
at org.jetbrains.exposed.sql.transactions.experimental.SuspendedKt.commitInAsync(Suspended.kt:103)
at org.jetbrains.exposed.sql.transactions.experimental.SuspendedKt.access$commitInAsync(Suspended.kt:1)
at org.jetbrains.exposed.sql.transactions.experimental.SuspendedKt$suspendedTransactionAsyncInternal$1.invokeSuspend(Suspended.kt:168)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:740)
tapac
11/27/2019, 10:04 AMAnimesh Sahu
11/29/2019, 4:29 PMnewSuspendedTransaction()
i.e. coroutine dispatching into the <http://Dispatchers.IO|Dispatchers.IO>
thread. What's going wrong?tapac
11/30/2019, 8:39 AMtransaction
block or maybe you run multiple newSuspendedTransaction
?Animesh Sahu
11/30/2019, 8:40 AM