【TiDB 使用环境】生产环境
【TiDB 版本】8.5.1
【操作系统】centos7.9
【部署方式】云上部署(阿里云)/机器部署)
【集群数据量】3T
【集群节点数】10
【问题复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
数据源mysql是分库128库,每个库执行如下ddl脚本:
create table bill_charge_notice_ticket_detail_allocation
(
detail_rel_id int(11) not null auto_increment comment ‘主键id’,
charge_notice_id int(11) comment ‘收费通知单ID’,
charge_notice_detail_id int(11) comment ‘收费通知单明细id’,
equipment_inst_name varchar(100) comment ‘仪表名称’,
equipment_inst_code varchar(100) comment ‘仪表编号’,
equipment_inst_id int(10) comment ‘仪表id’,
house_name varchar(100) comment ‘房屋名称’,
rate varchar(11) comment ‘倍率’,
last_time timestamp comment ‘上期抄表时间’,
last_value varchar(11) comment ‘上期读数’,
end_time timestamp comment ‘本期抄表时间’,
value varchar(11) comment ‘本期读数’,
use_value varchar(11) comment ‘本期抄表用量’,
loss_rate_value varchar(11) comment ‘损耗量’,
share_ratio decimal(11,4) comment ‘分摊系数’,
primary key (detail_rel_id)
);
alter table bill_charge_notice_ticket_detail_allocation comment ‘收费通知单关联分摊表’;
create index index_notice_id on bill_charge_notice_ticket_detail_allocation
(
charge_notice_id
);
通过dm同步到tidb128分库。
DM同步中断了,报code=36067错误,具体同步错误如下:
【复制黏贴 ERROR 报错的日志】
{
“error_msg”: “[code=36067:class=sync-unit:scope=internal:level=high], Message: startLocation: [position: (mysql-bin.000916, 74518961), gtid-set: 43b7c42c-07d6-11e8-8b17-00163e0ca8ec:1-1211997881,a5177baf-d46f-11ef-a4e3-00163e1edea0:1-90002931], endLocation: [position: (mysql-bin.000916, 74520063), gtid-set: 43b7c42c-07d6-11e8-8b17-00163e0ca8ec:1-1211997881,a5177baf-d46f-11ef-a4e3-00163e1edea0:1-90002932], origin SQL: [create table bill_charge_notice_ticket_detail_allocation\n(\n detail_rel_id int(11) not null auto_increment comment ‘主键id’,\n charge_notice_id int(11) comment ‘收费通知单ID’,\n charge_notice_detail_id int(11) comment ‘收费通知单明细id’,\n equipment_inst_name varchar(100) comment ‘仪表名称’,\n equipment_inst_code varchar(100) comment ‘仪表编号’,\n equipment_inst_id int(10) comment ‘仪表id’,\n house_name varchar(100) comment ‘房屋名称’,\n rate varchar(11) comment ‘倍率’,\n last_time timestamp comment ‘上期抄表时间’,\n last_value varchar(11) comment ‘上期读数’,\n end_time timestamp comment ‘本期抄表时间’,\n value varchar(11) comment ‘本期读数’,\n use_value varchar(11) comment ‘本期抄表用量’,\n loss_rate_value varchar(11) comment ‘损耗量’,\n share_ratio decimal(11,4) comment ‘分摊系数’,\n primary key (detail_rel_id)\n)]: parse DDL: create table bill_charge_notice_ticket_detail_allocation\n(\n detail_rel_id int(11) not null auto_increment comment ‘主键id’,\n charge_notice_id int(11) comment ‘收费通知单ID’,\n charge_notice_detail_id int(11) comment ‘收费通知单明细id’,\n equipment_inst_name varchar(100) comment ‘仪表名称’,\n equipment_inst_code varchar(100) comment ‘仪表编号’,\n equipment_inst_id int(10) comment ‘仪表id’,\n house_name varchar(100) comment ‘房屋名称’,\n rate varchar(11) comment ‘倍率’,\n last_time timestamp comment ‘上期抄表时间’,\n last_value varchar(11) comment ‘上期读数’,\n end_time timestamp comment ‘本期抄表时间’,\n value varchar(11) comment ‘本期读数’,\n use_value varchar(11) comment ‘本期抄表用量’,\n loss_rate_value varchar(11) comment ‘损耗量’,\n share_ratio decimal(11,4) comment ‘分摊系数’,\n primary key (detail_rel_id)\n), RawCause: line 12 column 14 near "last_value varchar(11) comment ‘上期读数’,\n end_time timestamp comment ‘本期抄表时间’,\n value varchar(11) comment ‘本期读数’,\n use_value varchar(11) comment ‘本期抄表用量’,\n loss_rate_value varchar(11) comment ‘损耗量’,\n share_ratio decimal(11,4) comment ‘分摊系数’,\n primary key (detail_rel_id)\n)" , Workaround: Please confirm your DDL statement is correct and needed. For TiDB compatible DDL, see https://docs.pingcap.com/tidb/stable/mysql-compatibility#ddl. You can use handle-error
command to skip or replace the DDL or add a binlog filter rule to ignore it if the DDL is not needed…\n”,
“name”: “bill_split”,
“source_name”: “bill”,
“stage”: “Paused”,
“sync_status”: {
“binlog_type”: “remote”,
“blocking_ddls”: null,
“master_binlog”: “(mysql-bin.000946, 695047723)”,
“master_binlog_gtid”: “43b7c42c-07d6-11e8-8b17-00163e0ca8ec:1-1211997881,a5177baf-d46f-11ef-a4e3-00163e1edea0:1-92900665”,
“recent_tps”: 0,
“seconds_behind_master”: 0,
“synced”: false,
“syncer_binlog”: “(mysql-bin.000916, 74518896)”,
“syncer_binlog_gtid”: “43b7c42c-07d6-11e8-8b17-00163e0ca8ec:1-1211997881,a5177baf-d46f-11ef-a4e3-00163e1edea0:1-90002931”,
“total_events”: 164624777,
“total_tps”: 635616,
“unresolved_groups”: null
},
“unit”: “Sync”,
“unresolved_ddl_lock_id”: “”,
“worker_name”: “dm_worker9”
}