Closed methodmissing closed 1 year ago
:wave: @osheroff @Naros @gunnarmorling if and when there's a free moment 🙇♂️
@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: https://github.com/debezium/debezium/pull/5036