Skip to content

Conversation

simolus3
Copy link
Contributor

This ports the Rust approach of listening to CRUD upload completions to the JS client as well.

Instead of polling on a promise that resolves on a CRUD upload, we register a listener on completed uploads as a callback. This callback then schedules another round of the main loop handling sync lines, triggering another attempt to apply the checkpoint. This mirrors the "merged streams" approach we have in Dart (and also in the Rust client).

To support this, I had to remove the non-raw methods from AbstractRemote - we need custom line mapping to inject the parsed upload complete notifications.

Copy link

changeset-bot bot commented Jul 11, 2025

🦋 Changeset detected

Latest commit: 2d52f71

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@powersync/react-native Patch
@powersync/common Patch
@powersync/web Patch
@powersync/node Patch
@powersync/op-sqlite Patch
@powersync/tanstack-react-query Patch
@powersync/diagnostics-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@simolus3 simolus3 requested a review from rkistner July 11, 2025 11:03
rkistner
rkistner previously approved these changes Jul 11, 2025
@simolus3 simolus3 merged commit a1aa18c into main Jul 11, 2025
9 checks passed
@simolus3 simolus3 deleted the dont-block-on-crud-uploads branch July 11, 2025 13:15
whygee-dev pushed a commit to whygee-dev/powersync-js that referenced this pull request Oct 18, 2025
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