-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
2.5.0.Alpha1
-
None
-
False
-
None
-
False
Bug report
For bug reports, provide this information, please:
What Debezium connector do you use and what version?
MySQL v2.5.0.Alpha1
What is the connector configuration?
Connector is used in DebeziumEngine with following configuration:
name: my.component.name connector.class: io.debezium.connector.mysql.MySqlConnector topic.prefix: my.component.name.db schema.history.internal: io.debezium.storage.kafka.history.KafkaSchemaHistory schema.history.internal.kafka.topic: my.company.db-history schema.history.internal.kafka.bootstrap.servers: xxx offset.storage: org.apache.kafka.connect.storage.KafkaOffsetBackingStore offset.storage.topic: my.company.db-offset offset.storage.partitions: 1 offset.storage.replication.factor: 1 offset.flush.interval.ms: 60000 bootstrap.servers: xxx schema.history.internal.consumer.security.protocol: xxx schema.history.internal.producer.security.protocol: xxx schema.history.internal.skip.unparseable.ddl: true tombstones.on.delete: false snapshot.mode: schema_only snapshot.locking.mode: none plugin.path:
What is the captured database version and mode of depoyment?
On-premise MariaDB v10.5
What behaviour do you expect?
No error during streaming
What behaviour do you see?
The MariaDB server sends an error when it should send a MARIADB_GTID event with "XA START" information, which stops the streaming. Debezium restarts and fails indefinitively on the same error.
Do you see the same behaviour using the latest relesead Debezium version?
Issue is not present in 2.4.0.Final version.
Do you have the connector logs, ideally from start till finish?
2023-11-07 14:16:39,950 ERROR i.d.c.m.MySqlStreamingChangeEventSource Error during binlog processing. Last offset stored = {transaction_id=null, file=<bin-log-file>, pos=1069461651, server_id=201, event=1}, binlog reader near position = <bin-log-file>/1069461651 2023-11-07 14:16:39,951 INFO c.g.shyiko.mysql.binlog.BinaryLogClient threadExecutor is shut down, terminating keepalive thread 2023-11-07 14:16:39,966 ERROR io.debezium.pipeline.ErrorHandler Producer failure io.debezium.DebeziumException: Failed to replace GTID event with backwards-compatible event: corrupt event.; the first event '<bin-log-file>' at 1069336773, the last event read from '<bin-log-file>' at 1069461651, the last byte read from '<bin-log-file>' at 1069461780. Error code: 1236; SQLSTATE: HY000. at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.wrap(MySqlStreamingChangeEventSource.java:1290) at io.debezium.connector.mysql.MySqlStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1335) at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:1096) at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:648) at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:949) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: com.github.shyiko.mysql.binlog.network.ServerException: Failed to replace GTID event with backwards-compatible event: corrupt event.; the first event '<bin-log-file>' at 1069336773, the last event read from '<bin-log-file>' at 1069461651, the last byte read from '<bin-log-file>' at 1069461780. at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:1060) ... 3 common frames omitted
How to reproduce the issue using our tutorial deployment?
Streams binlog from a MariaDB server with MySQL connector v2.5.0.Alpha1.
Then, perform an XA transaction with any client :
XA START 'test'; INSERT INTO myTable VALUES (...); -- Adapt with an existing table, can be an UPDATE XA END 'test'; XA PREPARE 'test'; XA COMMIT 'test';
The above change will never be processed, as any other change from this point.
Any idea ?
As discussed in this topic this error should be related to the MariaDB slave capability sent by the connector to the server.
The value has changed between the 2.4.0.Final version and the 2.5.0.Alpha1 version with this development : https://github.com/debezium/debezium/commit/dcce6f61f5e28efb5643fccd264f05d8e00ed28e
This change should prevents the connector to fetch GTIDs, so I think this bug should be resolved once MariaDB GTIDs are supported (DBZ-1482).