Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Is there any updates? This is a big problem!
ya...@google.com <ya...@google.com>
an...@google.com <an...@google.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!
ap...@google.com <ap...@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()
}
Description
Version used: 2.0.0-rc01
Devices/Android versions reproduced on:
room.expandProjection can rewrite "SELECT *", but it still shows warnings about cursor mismatch.
Cause:
PojoRowAdapter shows the warnings. It runs before QueryInterpreter transforms the SQL. The ResultInfo is updated, but PojoRowAdapter uses the old ResultInfo from "SELECT * ".