Skip to content

Fix checkpoints during uploads not being applied #160

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 11 commits into from
Apr 8, 2025

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Apr 3, 2025

This is the Kotlin port of powersync-ja/powersync-js#558, see that PR for a more complete description.

I also had to fix some other quirks in the sync implementation here, notably:

  1. The triggerCrudUpload() call when receiving keep-alive messages used to block the entire sync stream from receiving subsequent lines until the upload was completed. This changes that to spawn an async job that is not awaited (the trigger listening on ps_crud will still await this though).
  2. There was no way to abort sync iterations (used e.g. for checkpoints with a checksum mismatch). This adds that functionality.

@simolus3 simolus3 requested a review from stevensJourney April 3, 2025 18:16
stevensJourney
stevensJourney previously approved these changes Apr 4, 2025
Copy link
Contributor

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simolus3 simolus3 requested a review from stevensJourney April 7, 2025 14:06
@simolus3 simolus3 merged commit 3eda581 into main Apr 8, 2025
3 checks passed
@simolus3 simolus3 deleted the fix-download-race-condition branch April 8, 2025 05:26
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