-
Notifications
You must be signed in to change notification settings - Fork 13
UPDATE in transaction is not applied sometimes #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report! In the logs, I see a number of |
I do not control this limit, I connect my |
Oh right, sorry 🤦 And that one actually uses the default limit, so I need to check where that |
Is it this one? powersync-kotlin/core/src/commonMain/kotlin/com/powersync/db/PowerSyncDatabaseImpl.kt Line 294 in 3eda581
![]() |
Hi @simolus3, I have new findings to share:
So, weird stuff. Here you can see attempts to sync transfers INSERT with anon role JWT:
But after I manually opened the app in a minute, the same INSERT is synced successfully:
|
Fix (presumably) not saving updated balance from time to time when launched from the transfer shortcut. powersync-ja/powersync-kotlin#167
Hi guys, I have this weird issue with 1.0.0-BETA28, and I would greatly appreciate any help in debugging it.
Scenario:
writeTransaction
is executed inviewModelScope
which contains the following queries:writeTransaction
is completed successfully, the screen closes and so the app goes to backgroundThe issue: sometimes the balance UPDATE is not applied, although the new row gets inserted into the transfers table within the same transaction.
On the other hand, if the same expense logging is done from the main app screen, so the app doesn't go to background on transaction success, the UPDATE is always applied, and the user immediately sees the updated value in the UI (via
database.watch()
)Here is the log for the case when UPDATE has not been applied:
log.txt
There's a big time difference between 21:43:11.616 and 21:43:27.738 because I actually managed to suspend the
SupabaseConnector
by a breakpoint to confirm thattable.update
was indeed called withentry.opData
having "balance=-4314082". Nevertheless, the balance in Supabase remained the same, and so it did in the app.The text was updated successfully, but these errors were encountered: