The Mysql connector should always store the last GTID of the database [DBZ-3701]
- Dominant language
- HTML
- Stars
- 6
- Forks
- 8
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 1
Description
Migrated from [DBZ-3701](https://issues.redhat.com/browse/DBZ-3701)
Hi,
I am using a Mysql database with binlog-expire setting to 7 days.
From what I can see, the Mysql connector only stores the GTID (or binlog position) to the offset topic only if there are changes to the tables that it watches for changes.
The may leads to the fact that if there are no changes (inserts/updates/deletes) to the tables since the last 7 days (all the binlog files that older than 7 days have been purged) and if we restart the connector, it will reconnect with the GTID it stored 7 days ago which is no longer available in the Mysql cluster. Then we have way to recover but to retake initial snapshot
So to be safe I think the connector should periodically (the interval could be configurable) save the last GTID (binlog position) to the offset topic to avoid the above situation from happening.
Contributor guide
Assessment
This issue has not been assessed yet.