Status Update
Comments
ga...@gmail.com <ga...@gmail.com> #2
This happens when blocking thread interrupted.
Use case: RxJava, When switchMap is upstream, downstream blocking operation will be interrupted.
In older version room, runInTransaction is not interruptible, never throws exception like this.
yb...@google.com <yb...@google.com> #3
We updated Room internals to Coroutines and one of the improvements is interruption. Before the internal changes, Room would ignore thread interruption, database operations where not really cancellable, but in the latest version and due to Coroutines, Room can be interrupted but since it has to return some value which it couldn't compute it then throws InterruptedException
as part of the runBlocking
used to bridge blocking DAO functions with Coroutine internals. I think you will need to handle the exception as any other and determine what to return or ignore since Room can't make that decision for you.
Description
Migration fails only because old database was created with type "integer", while Room by default expects "INTEGER". Take a look at picture also.
I'm 100% sure this is the problem, because if I change old DB datatypes to capped letters during migration (with that being the only change), Room picks it up properly.
Component used: Room
Version used: 1.0.0-alpha3
Devices/Android versions reproduced on: Motorola Moto G (Android 5.1)
- Screenshot attached