-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add snapshot support to logrepl mode #141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, Lyu!
a6c1322
to
0a0ba9a
Compare
0a0ba9a
to
22d4fb0
Compare
The new combined iterator integrates snapshots with the existing cdc iterator. Once the snapshot is completed, it will swithc to cdc. When using snapshots, the connector will run both cdc and snapshot at the same time. This is required because the cdc iterator needs to be initialized and export a consistent snapshot which is taken at the time of the slot creation. The cdc iteator will need to keep the connection open until the snapshot is done. The switch to the cdc iterator is triggered when the snapshot returns an end of records error. Based on this signal, the cdc subscriber will be started to consume changes from the replication slot.
5d83fd8
to
10e4575
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I left a couple of non-blockers. Great work, Lyubo!
Co-authored-by: Lovro Mažgon <[email protected]>
Co-authored-by: Lovro Mažgon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I added one last suggestion. Good work 👍
Description
The new combined iterator integrates snapshots with the existing cdc iterator.
Once the snapshot is completed, it will swithc to cdc.
When using snapshots, the connector will run both cdc and snapshot at the same time.
This is required because the cdc iterator needs to be initialized and export a consistent
snapshot which is taken at the time of the slot creation. The cdc iteator will need to
keep the connection open until the snapshot is done.
The switch to the cdc iterator is triggered when the snapshot returns an end of records error.
Based on this signal, the cdc subscriber will be started to consume changes from the replication slot.
Fixes #15
Quick checks: