Shopify / ghostferry

The swiss army knife of live data migrations
https://shopify.github.io/ghostferry
MIT License
693 stars 65 forks source link

Detect ddl add handlers #323

Closed shivnagarajan closed 2 years ago

shivnagarajan commented 2 years ago

This is a slightly alternate version of

https://github.com/Shopify/ghostferry/pull/322

@pawandubey

shivnagarajan commented 2 years ago

This changes the code to provide the ability to add a binlogEvent handler for individual events. The golang test has been updated to test adding such a handler for a query event and validates that it actually works.

Since the code no longer needs to parse the binlog events explicitly, we did not need to pull in the full parser for the ddl events that we had earlier.

shivnagarajan commented 2 years ago

I just rebased this to latest master. Will clean up a little based on the remaining comments.