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

[DBZ-PGYB][yugabyte/yuyabyte-db#24204] Changes to support LSN types with replication slot #162

Open
wants to merge 6 commits into
base: ybdb-debezium-2.5.2
Choose a base branch
from

Conversation

vaibhav-yb
Copy link
Collaborator

@vaibhav-yb vaibhav-yb commented Oct 16, 2024

YugabyteDB logical replication now supports creating replication slots with two types of LSN:

  1. SEQUENCE - This is a monotonic increasing number that will determine the record in global order within the context of a slot. However, this LSN can’t be compared across two LSN’s of different slots.
  2. HYBRID_TIME - This will mean that the LSN will be denoted by the HybridTime of the transaction commit record. All the records of the transaction that is streamed will have the same LSN as that of the commit record. The user has to ensure that the changes of a transaction are applied in totality and the acknowledgement is sent only if the commit record of a transaction is processed. With this mode, the LSN value can be compared across the different slots.

To ensure that the connector also supports streaming for both LSN types, this PR introduces the following changes:

  1. Adds a configuration property slot.lsn.type which accepts two parameters i.e. SEQUENCE or HYBRID_TIME with the default being SEQUENCE
    a. Note that this property only accepts parameters in uppercase.
  2. Depending on the LSN type provided, the connector processes events accordingly.

This closes yugabyte/yuyabyte-db#24204

@vaibhav-yb vaibhav-yb self-assigned this Oct 16, 2024
@vaibhav-yb vaibhav-yb changed the title [DBZ-PGYB] Changes to support LSN types with replication slot [DBZ-PGYB][yugabyte/yuyabyte-db#24204] Changes to support LSN types with replication slot Oct 16, 2024
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