-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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] Use event filter to drop events earlier than the specified timestamp in timestamp startup mode #1724
Conversation
10971fc
to
74db2ca
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
...-cdc/src/main/java/com/ververica/cdc/connectors/mysql/debezium/reader/BinlogSplitReader.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/ververica/cdc/connectors/mysql/debezium/task/context/MySqlErrorHandler.java
Outdated
Show resolved
Hide resolved
.../src/test/java/com/ververica/cdc/connectors/mysql/debezium/reader/BinlogSplitReaderTest.java
Outdated
Show resolved
Hide resolved
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 update, LGTM
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 update, LGTM
…mestamp in timestamp startup mode (apache#1724)
…earliest but schema change happened before (apache#1724)
68d0da5
to
5ae25c8
Compare
…mestamp in timestamp startup mode (apache#1724)
…earliest but schema change happened before (apache#1724)
…mestamp in timestamp startup mode (#1724)
…earliest but schema change happened before (#1724)
…mestamp in timestamp startup mode (#1724)
This pull request reworks the logic of timestamp startup mode, which uses a event filter in
MySqlBinlogSplitReadTask
to drop events earlier than the specified startup timestamp.Compared to the previous implementation #1661 in which the filter was applied on
ChangeEventCreator
, the filter is applied right after the binlog event is received, so that the diff in schema will not be complained by Debezium reader under the case that schema change happens before the specified timestamp.This PR also improves the error message under the case that starting from earliest offset but schema change happened before.