Firstly, thanks for the great library. It is very well architected.
🐛 Bug Report
I see a flurry of the following logs intermittently:
Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
...
Upon enabling the debug mode with Sqflite.devSetDebugModeOn(true), I can see that this is triggered during an UPDATE query that looks as follows:
Firstly, thanks for the great library. It is very well architected.
🐛 Bug Report
I see a flurry of the following logs intermittently:
Upon enabling the debug mode with
Sqflite.devSetDebugModeOn(true)
, I can see that this is triggered during anUPDATE
query that looks as follows:This is a race condition that happens intermittently but cannot be reproduced reliably.
Further inspection makes me question the complexity of the current code that ensures a single instance of DB.
It might make sense to use a simpler approach as recommended by the author of the sqflite library: https://github.com/tekartik/sqflite/blob/master/sqflite/doc/usage_recommendations.md#single-database-connection.
Please let me know if I can help.
Thanks again!