I am trying to migrate from 8.0 w/ a traditional async replication to InnoDB cluster.
To facilitated this, I’m doing the following:
- restoring a PS 8.0 xtrabackup backup of one of the existing replicas on a PS 8.4.4 test server
- adding users and permissions for InnoDB cluster over three servers
- Creating a new InnoDB cluster from node1, then adding the two new instances via “clone”
- on the primary server use CHANGE REPLICATION SOURCE with SOURCE_AUTO_POSITION=1 to connect the server to the upstream database server
Shortly after step 4, the SQL slave thread fails in a DELETE event with HA_ERR_KEY_NOT_FOUND. It is always the same table.
If I don’t add the cluster and just set up a replica, no problem. Replication will run for days.
I RESET REPLICA ALL after three days of successful replication to a stand-alone node, set up that node as the seed and set up the cluster, and then use CHANGE REPLICATION SOURCE w/ SOURCE_AUTO_POSITION=1 the primary server will run for a bit then fail again in a DELETE event in the same table.
I’m trying to figure out if I am doing anything wrong with regards to InnoDB Cluster/GR. It is the only variable in the mix.
If it is of any interest, here is the DDL for the table that generates the HA_ERR_KEY_NOT_FOUND:
CREATE TABLE cne_job
(
CNEJOBID
int unsigned NOT NULL AUTO_INCREMENT,
CNEBATCHJOBID
int unsigned DEFAULT NULL,
SUBID
int unsigned DEFAULT NULL,
category
enum(‘VLB’,‘VKE’) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
service
enum(‘qm’,‘randal’,‘arkenstone’,‘administer’) DEFAULT NULL,
service_job_id
int DEFAULT NULL,
service_job_name
varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
action
enum(‘CREATE’,‘READ’,‘UPDATE’,‘DELETE’) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
state
enum(‘ENQUEUE’,‘PROCESSING’,‘COMPLETE’) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT ‘ENQUEUE’,
error
tinyint(1) NOT NULL DEFAULT ‘0’,
request_payload
longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
response_payload
longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
created_at
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
group
varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
service_method
varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
queue_id
int unsigned DEFAULT NULL,
trigger
varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
queue_resp
text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
NODE_SUBID
int unsigned DEFAULT NULL,
PRIMARY KEY (CNEJOBID
),
KEY CNEBATCHJOBID
(CNEBATCHJOBID
),
KEY SUBID
(SUBID
),
KEY service_method
(service_method
,service
,state
)
) ENGINE=InnoDB AUTO_INCREMENT=2381921 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci