tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
11.88k stars 295 forks source link

Sync prevents concurrent reads? #979

Open penberg opened 9 months ago

penberg commented 9 months ago

Airyland on Discord reports that:

Appears that the embedded replica's .sync function is blocking SQL queries. Is there a way to allow queries to execute concurrently with the sync process?

SQLite itself should be able to serve reads while we're syncing and applying changes to the WAL. Perhaps there is a serializing lock somewhere that prevents this?

amitu commented 1 month ago

What is the status of this? We are considering using Turso, and want to do sync to keep data fresh on more than one edge locations, but if sync locks reads, it would be issue.