github / gh-ost

GitHub's Online Schema-migration Tool for MySQL
MIT License
12.42k stars 1.26k forks source link

skip delete events of changelog table in binlog listener #1427

Open whhe opened 4 months ago

whhe commented 4 months ago

We are building a system for OceanBase database that is compatible with MySQL's SQL protocol and Replication protocol, called OceanBase Binlog Service. For some reason, an upsert event (on duplicated key update) in this system is converted into a delete event and an insert event in the binlog. In order to make it work without affecting the original logic, I want to check and skip the delete event of the changelog in the onChangelogEvent function.

https://github.com/github/gh-ost/blob/59db6fab40966c2c491de935e6a71b8c23aafa86/go/logic/migrator.go#L202