tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.

Home Page:https://turso.tech/libsql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sync can never finish

haaawk opened this issue · comments

Currently the sync repeats until a fetch of new frames returns no new frames.
This is problematic because it might take arbitrary long. To the extreme of never finishing.

I was able to achieve a sync taking forever by having primary in iad, a writer in iad writing every 200ms and an embedded replica in syd calling sync. Because single iteration of sync takes 2 round trips (Hello + BatchLogEntries) it's enough to have a write more often than the time it takes to do those two round trips to make sync never finish.