-
Notifications
You must be signed in to change notification settings - Fork 161
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
Introduce support for MySQL 8 specific metadata on GTID events #130
Conversation
e1de58f
to
a255393
Compare
1ad97f6
to
583f7c6
Compare
👋 @osheroff @Naros @gunnarmorling if and when there's a free moment 🙇♂️ |
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 overall, left two comments @methodmissing
...com/github/shyiko/mysql/binlog/event/deserialization/MysqlGtidEventDataDeserializerTest.java
Outdated
Show resolved
Hide resolved
583f7c6
to
c8a4acf
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.
@methodmissing @osheroff, ran the Debezium test suite with MySQL and MariaDB, worked like a champ with no regression or problems.
@osheroff would you be able to merge and cut a release in the near future? We have an upstream PR waiting for this that I'd like to include in the Debezium 2.5 release going out to final in about ~2 weeks. |
done, 0.29.0 |
Why?
Getting actual high resolution millisecond binlog event time values is not supported by the binlog event header as the timestamp field is represented as 4 bytes and only supports second resolution. This basically cannot change without breaking binary compatibility and subsequently replication and binlog tooling as the 19 byte header offset is hardcoded in so many spots.
We're pushing Shopify's CDC stack (this client and Debezium MySQL connector based) for lower latency to drive new business use cases, but need better timestamp resolution for the hop from writer -> ingested by our pipeline.
Related: binlog event header struct, Maxwell issue, higher level explanation of the MySQL 8 replication timestamps
How?
The only other obvious alternative for MySQL > 8.0.1 is to extract additional metadata from the GTID event, specifically this set of metadata up to current MySQL 8 versions:
Aligned to be very close to the actual control event implementation in
libbinlogevents
Gtid_event
in headerGtid_event
in sourceBinlog events used in the tests
@Naros suggested to include a unit tests with payloads and assertions specific to these MySQL 8 versions:
8.0.1
,8.0.2
, and >8.0.14
MySQL 8.0.1
MySQL 8.0.2
MySQL 8.1.0
Corresponding Debezium PR: debezium/debezium#5036