-
Notifications
You must be signed in to change notification settings - Fork 54
Description
We are using powersync with a react native app. We have a postgres database. A month ago (~July 1st) we turned on the experimental rust-based sync client.
powerSyncDb
/*** ADDED THESE 3 LINES ***/
.connect(connector, {
clientImplementation: SyncClientImplementation.RUST,
})
.then(() => {
powerSyncDb.init();
});
We soon noticed that syncing was failing. Specifically, this occured when:
- we turned off cell/wifi
- while offline, modified data on the app (modifying an existing row)
- turned wifi back on so that sync would commence.
We display the powersync status in the app (reading from useStatus().hasSynced
), and it would alternate between showing 'syncing...' (hasSynced = false) and then briefly showing up to date
(hasSynced = true), before going back to syncing. Our postgres DB never received the updated data. The issue did not surface if you never turned wifi off/on; if you made changes all while online, those seemed to sync.
On July 3rd we identified the issue and removed the rust-client flag, which resolved the issue. I recognize that this is an experimental feature, but wanted to flag so that the folks working on this feature are aware. Apologies for not filing an issue sooner - was on vacation for a bit and forgot. We did love how fast the rust sync engine was when it worked, was so are very excited for it's potential.
Thank you!
"@powersync/common": "^1.32.0",
"@powersync/kysely-driver": "^1.2.0",
"@powersync/op-sqlite": "^0.7.0",
"@powersync/react": "^1.5.3",
"@powersync/react-native": "^1.22.0",
"@powersync/tanstack-react-query": "^0.0.26",