Skip to content
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

Fix of the pglite-sync plugin for latest electric #535

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

samwillis
Copy link
Collaborator

@samwillis samwillis commented Feb 12, 2025

During initial sync there is nigher the old offset or new lsn + op_positon on each message, we have to fallback to the stream.lastOffset value which is the last offset of the final messages in the stream (retrieved from the http header). This replicates the behaviour of the plugin from before the changes to the sync protocol and ensures it will continue to work.

However, we still need to make further changes, and the is likely to include changing the commitGranularity option. While this api is useful for incrementally inserting data during initial sync, it is not possible to actually resume from mid way in a snapshot.

The further changes to this api will come as part of a larger refactor to the plugin.

Copy link
Contributor

github-actions bot commented Feb 12, 2025

@samwillis samwillis changed the title WIO: Fix of the pglite-sync plugin for latest electric Fix of the pglite-sync plugin for latest electric Feb 13, 2025
@samwillis samwillis marked this pull request as ready for review February 13, 2025 11:55
@copiltembel copiltembel self-requested a review February 13, 2025 13:43
Copy link
Collaborator

@copiltembel copiltembel left a comment

Choose a reason for hiding this comment

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

LGTM!

@samwillis samwillis merged commit c489ec0 into main Feb 13, 2025
8 checks passed
@samwillis samwillis deleted the samwillis/fix2-pglite-sync branch February 13, 2025 18:34
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