[DBZ-PGYB][yugabyte/yuyabyte-db#24204] Changes to support LSN types with replication slot #162
+211
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
YugabyteDB logical replication now supports creating replication slots with two types of LSN:
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.HYBRID_TIME
- This will mean that the LSN will be denoted by theHybridTime
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:
slot.lsn.type
which accepts two parameters i.e.SEQUENCE
orHYBRID_TIME
with the default beingSEQUENCE
a. Note that this property only accepts parameters in uppercase.
This closes yugabyte/yuyabyte-db#24204