Status Update
Comments
yb...@google.com <yb...@google.com> #2
Is there any updates? This is a big problem!
gm...@gmail.com <gm...@gmail.com> #3
Hi there - could you provide more context on the issue & a sample project to reproduce? Database locked exceptions are quite difficult to pinpoint without a repro project. Thanks!
yb...@google.com <yb...@google.com> #4
Hi. It is reproduceable on some users by using this code:
suspend fun <R> MyDatabase.workaroundWithTransaction(block: suspend TransactionScope<R>.() -> R) {
useWriterConnection {
it.immediateTransaction(block)
}
// TODO: Temporally fix https://issuetracker.google.com/issues/340606803#comment2
// Manually triggers invalidation
invalidationTracker.refreshAsync()
}
ap...@google.com <ap...@google.com> #6
Hi. Please merge the pull request. This is big problem!
da...@google.com <da...@google.com>
wo...@gmail.com <wo...@gmail.com> #7
Hi. Is there any updates on this problem?
ph...@gmail.com <ph...@gmail.com> #8
Hi, I updated my version to alpha12 but still have these crashes. Please release a fix asap.
ph...@gmail.com <ph...@gmail.com> #9
Will there be fixes released this Wednesday?
ph...@gmail.com <ph...@gmail.com> #10
Hey, there is no release on Wednesday (holiday in the USA)
We haven't found the root cause of this exception, it happens when SQLite can't commit the transaction because some other connection has a lock, we need more information, a sample project that reproduces the issue preferably, or more details on how the database is being used (is it from multiple process? is there heavy concurrency?).
You can also increase the time SQLite will wait before it error with 'database locked' by executing PRAGMA busy_timeout = <time in ms>
, the current default is 3000
Description
Version used: 2.0.0
Devices/Android versions reproduced on:
Nexus 4 (Android 5.1.1)
Nexus 5 (Android 6.0.1)
Subscribing & unsubscribing causes StrictModeDiskReadViolation & StrictModeDiskWriteViolation.
This is very strange, given that "If you’re worried about threads, Room keeps you at ease and ensures that observable queries are done off the main thread." (from
Sample project attached.