Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: 2.0.0
Devices/Android versions reproduced on: Any
We recently started seeing a lot of lock contention upon subscription to Observables provided by Room. At first we thought that the problem was caused by `syncTriggers` doing DB work on the main thread (a known issue here:
It seems that the close lock is unintentionally being used to obtain an exclusive lock on the entire database, blocking any other subscriptions while there is either another subscription happening at the same time or the refresh runnable is running. I'm not sure why the protection against closing is required in the first place, but maybe a `ReentrantReadWriteLock` could accomplish the intended goal without the exclusiveness.