-
Bug
-
Resolution: Done
-
Critical
-
0.9.4.Final
-
None
We use Debezium for CDC on a Percona XTraDB cluster. Most of our schema migration are performed online with no downtime using the percona provided tool pt-online-schema-change.
It seems that migration performed by this tool are not identified by Debezium.
This tools work as following:
- create a "ghost" table with the same structure as the original one
- perform the schema migration on the ghost
- create insert, delete, update trigger from the original to the ghost table
- copy data from original to ghost
- rename original to _old, rename ghost to original
- drop _old
- drop triggers
We had a case recently where a migration was applied and then one hour later an update was performed on the table which lead to the provided error (see attached stack). According to the error message it looks like debezium is not aware of the new schema (shift by one column in data type).
The original table DDL is as follow:
CREATE TABLE `my_db_name`.`my_table_name` ( `my_table_name_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `tour_id` int(11) unsigned NOT NULL, `status` enum('new','pending','approved','rejected','deleted') NOT NULL DEFAULT 'new', `fields` varchar(600) NOT NULL, `comment` text NOT NULL, `reject_reasons` varchar(500) DEFAULT NULL, `reject_text` varchar(1000) DEFAULT NULL, `creation_timestamp` datetime NOT NULL, `requester_user_type` enum('staff','supplier') DEFAULT NULL, `update_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_user_type` enum('staff','supplier','reseller','customer','cron_job') DEFAULT NULL, `update_user_id` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`my_table_name_id`), KEY `tour_id_status` (`tour_id`,`status`) ) ENGINE=InnoDB AUTO_INCREMENT=483132 DEFAULT CHARSET=utf8 COMMENT='5.6' ;