flink-cdc icon indicating copy to clipboard operation
flink-cdc copied to clipboard

[MySQL] Caused by: io.debezium.DebeziumException: Received DML xxx binlog probably contains events generated with statement or mixed based replication format

Open yangrong688 opened this issue 3 years ago • 4 comments

Describe the bug(Please use English) Binlog will have mixed replcation format when Cloud db like CDB HA transition and send statement format replication to binlog In debezium 1.5.4 Final, it will fail and cannot restore from checkpoint when ocurring DB HA transition, we should cherry pick https://github.com/debezium/debezium/pull/3319 this pr to solve this problem.

Environment :

  • Flink version : 1.13.3
  • Flink CDC version: 2.1.0
  • Database and version: MySQL 5.7

To Reproduce Steps to reproduce the behavior:

  1. Thes test data :
  2. The test code :
  3. The error : Caused by: io.debezium.DebeziumException: Received DML 'DELETE FROM _cdbcksum__329_124080501_1648309680.checksums WHERE db = 'xx' AND tbl = 'a'' for processing, binlog probably contains events generated with statement or mixed based replication format at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleQueryEvent(MySqlStreamingChangeEventSource.java:556) ~[flink-sql-connector-mysql-cdc-2.1.1.jar:2.1.1] at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:352) ~[flink-sql-connector-mysql-cdc-2.1.1.jar:2.1.1] at com.ververica.cdc.connectors.mysql.debezium.task.MySqlBinlogSplitReadTask.handleEvent(MySqlBinlogSplitReadTask.java:94) ~[flink-sql-connector-mysql-cdc-2.1.1.jar:2.1.1] at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1118) ~[flink-sql-connector-mysql-cdc-2.1.1.jar:2.1.1] at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:966) ~[flink-sql-connector-mysql-cdc-2.1.1.jar:2.1.1] at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:606) ~[flink-sql-connector-mysql-cdc-2.1.1.jar:2.1.1] at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:850) ~[flink-sql-connector-mysql-cdc-2.1.1.jar:2.1.1] ... 1 more

Additional Description If applicable, add screenshots to help explain your problem.

yangrong688 avatar Mar 28 '22 10:03 yangrong688

@leonardBang shall we fix this issue like we did in https://github.com/ververica/flink-cdc-connectors/pull/911

yangrong688 avatar Mar 28 '22 10:03 yangrong688

@yangrong688 I think we can fix this in flink cdc code, If we want to use debezium's PR I tend to bump debezium version to fix the issue.

leonardBang avatar Mar 29 '22 03:03 leonardBang

@yangrong688 I think we can fix this in flink cdc code, If we want to use debezium's PR I tend to bump debezium version to fix the issue.

OK, I will try to commit a pr to fix this in flink cdc code.

yangrong688 avatar Mar 29 '22 03:03 yangrong688

This issue will be fixed by #1236.

ruanhang1993 avatar Aug 17 '22 09:08 ruanhang1993

Closing this issue because it was created before version 2.3.0 (2022-11-10). Please try the latest version of Flink CDC to see if the issue has been resolved. If the issue is still valid, kindly report it on Apache Jira under project Flink with component tag Flink CDC. Thank you!

PatrickRen avatar Feb 28 '24 15:02 PatrickRen