-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[mysql] Support starting reading binlog from earliest offset / specific offset / timestamp #1661
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.
@PatrickRen Thanks for the contribution, Could you fix the compile issue firstly?
a3b29ca
to
1446ad8
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.
Thanks @PatrickRen for the contribution, I left some comments. Please update the connector docs as well.
...src/main/java/com/ververica/cdc/connectors/mysql/debezium/task/MySqlBinlogSplitReadTask.java
Outdated
Show resolved
Hide resolved
...n/java/com/ververica/cdc/connectors/mysql/debezium/task/context/ChangeEventCreatorUtils.java
Outdated
Show resolved
Hide resolved
...-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/offset/BinlogOffsetBuilder.java
Show resolved
Hide resolved
/** The binlog offset is described by a timestamp. */ | ||
TIMESTAMP, | ||
|
||
/** | ||
* A specific offset described by binlog file name and position, or GTID set if GTID is enabled | ||
* on the cluster. | ||
*/ | ||
SPECIFIC, |
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.
We can given three examples for each kind in note.
...ql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/offset/BinlogOffsetUtils.java
Outdated
Show resolved
Hide resolved
...ql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/reader/MySqlSourceReader.java
Show resolved
Hide resolved
.../src/test/java/com/ververica/cdc/connectors/mysql/debezium/reader/BinlogSplitReaderTest.java
Show resolved
Hide resolved
.../src/test/java/com/ververica/cdc/connectors/mysql/debezium/reader/BinlogSplitReaderTest.java
Show resolved
Hide resolved
...tor-mysql-cdc/src/test/java/com/ververica/cdc/connectors/mysql/source/MySqlSourceITCase.java
Outdated
Show resolved
Hide resolved
...tor-mysql-cdc/src/test/java/com/ververica/cdc/connectors/mysql/source/MySqlSourceITCase.java
Outdated
Show resolved
Hide resolved
ef8b512
to
27ee38c
Compare
…ic offset / timestamp (apache#1661) This closes apache#254
150c4f7
to
5d9878f
Compare
5d9878f
to
76aa5ad
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.
Big thanks @PatrickRen for the update, LGTM
This PR introduces a new feature #254 for the new MySQL CDC source, that users could specify starting point of binlog reading, including earliest offset, specific offset and timestamp.