sqlite on Android synchronizes access to be sequen...
# squarelibraries
s
sqlite on Android synchronizes access to be sequential. Is there a simple way to get the SQLDelight sqlite driver for JVM to act the same way? When there's a lot of writing happening, I'm seeing lots of
[SQLITE_BUSY] The database file is locked (database is locked)
errors.
I'm not sure if that is actually true. I had set
PRAGMA journal_mode = WAL
on Android and not for JVM. Adding it to JVM stopped the exceptions.
u
how can wal help with that? it still serializes writes, just allows reads to happen during reads unless im living a lie for years
s
Sorry, a bunch of bad assumptions on my part. There was a botched migration that dropped an index. I don't know why sqlite was throwing exception in that case, but not with the index. I changed to WAL at the same time that rebuilt the database without realizing.