Skip to content

Fix reverting failed deletes #39

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

Merged
merged 2 commits into from
Jan 2, 2024
Merged

Fix reverting failed deletes #39

merged 2 commits into from
Jan 2, 2024

Conversation

rkistner
Copy link
Contributor

If a row is modified locally, and the upload batch is completed without the update is not applied on the server (e.g. due to validation or RLS error), the client needs to revert the local update.

This was correctly implemented for INSERT and UPDATE statements, but not for DELETE. The row would remain deleted on the client, instead of re-creating the row after syncing. This fixes the issue by handling deletes in the same way as inserts and updates - storing a marker record in ps_oplog until the next sync completes.

@rkistner rkistner merged commit 0778b06 into master Jan 2, 2024
@rkistner rkistner deleted the fix-reverting-deletes branch January 2, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants