Bug #116511 Sync crash in innodb cluster
Submitted: 30 Oct 2024 20:03 Modified: 31 Oct 2024 10:31
Reporter: CunDi Fang Email Updates:
Status: Duplicate Impact on me:
None 
Category:Shell AdminAPI InnoDB Cluster / ReplicaSet Severity:S1 (Critical)
Version:8.0.35-innodb cluster OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[30 Oct 2024 20:03] CunDi Fang
Description:
MySQL Group Replication has a critical error during synchronization that prevents cluster nodes from continuing to synchronize properly and is forced to set to read-only mode.

It takes one data type incompatibility to trigger this issue.

How to repeat:
Here is the log:
```
2024-10-30T04:01:22.686264Z 40 [ERROR] [MY-013146] [Repl] Replica SQL for channel 'group_replication_applier': Worker 1 failed executing transaction 'e6387c80-95c4-11ef-ac8b-0242c0050a08:7851'; Column 2 of table 'mytest103.test1' cannot be converted from type 'float' to type 'tinyint(1)', Error_code: MY-013146
2024-10-30T04:01:22.686405Z 39 [Warning] [MY-010584] [Repl] Replica SQL for channel 'group_replication_applier': ... The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state. A restart should restore consistency automatically, although using non-transactional storage for data or info tables or DDL queries could lead to problems. In such cases you have to examine your data (see documentation for details). Error_code: MY-001756
2024-10-30T04:01:22.686473Z 39 [ERROR] [MY-011451] [Repl] Plugin group_replication reported: 'The applier thread execution was aborted. Unable to process more transactions, this member will now leave the group.'
2024-10-30T04:01:22.686573Z 37 [ERROR] [MY-011452] [Repl] Plugin group_replication reported: 'Fatal error during execution on the Applier process of Group Replication. The server will now leave the group.'
2024-10-30T04:01:22.686934Z 37 [ERROR] [MY-011712] [Repl] Plugin group_replication reported: 'The server was automatically set into read only mode after an error was detected.'
2024-10-30T04:01:22.687033Z 37 [System] [MY-011565] [Repl] Plugin group_replication reported: 'Setting super_read_only=ON.'
```

Here is the SQL I used:
SELECT * FROM mytest103.test1 WHERE ((column2 > NULL) OR column3 > 1) AND column3 < 1 ORDER BY column3 FOR UPDATE
And here is the create table of test1:
 CREATE TABLE IF NOT EXISTS mytest103.test1 (column0 INT AUTO_INCREMENT, column1 BOOLEAN NOT NULL COMMENT 'random comment', column2 FLOAT NOT NULL UNIQUE, column3 BOOLEAN COMMENT 'random comment', column4 FLOAT NOT NULL, column5 INT, column6 DATETIME, PRIMARY KEY (column0), UNIQUE (column2) );

Suggested fix:
Replica SQL in log for channel 'group_replication_applier': Worker 1 failed executing transaction 'e6387c80-95c4-11ef-ac8b-0242c0050a08:7851'; Column 2 of table 'mytest103.test1' cannot be converted from type 'float' to type 'tinyint(1)' Tip encountered a data type incompatibility problem while executing transaction, i.e., it is not possible to convert the float type of column 2 of table mytest103.test1 to tinyint(1). test1 cannot be converted from type 'float' to type 'tinyint(1)'. This error (Error_code: MY-013146) directly causes the synchronization transaction to fail.
[31 Oct 2024 10:31] MySQL Verification Team
Duplicate of Bug #116512