Currently, sync consistency is a big priority for PowerSync. In short:
The local view of the data is only updated when the client has downloaded a fully consistent checkpoint.
It is only updated when all pending changes from the client have been uploaded, acknowledged by the server and synced back (via write checkpoints).
Details here:
https://docs.powersync.com/architecture/consistency
This does however sacrifice performance in some cases:
When syncing a lot of data (say a million rows), it can take minutes to sync, and in that period no data is available on the client. There are workarounds using client parameters to initially sync a smaller subset before switching to the entire set of data, but that doesn’t cover cases such as re-syncing data after sync rule updates.
If changes are continuously made on the client, the client don’t get any updates until that is done. A good example is our Yjs demo, where you only see another user’s updates once you stop typing.
This feature introduces the concept of a sync priority per bucket