dm-v5.4.0 ddl 信息报错

使用背景:
上游mysql5.7.24 同步dm-v5.4.0 同步到下游的tidb-v5.4.0

问题描述:
同步过程中有如下报错

处理过程:
使用operate-schema 修改表结构信息

» operate-schema set -s zhibo_jx_jx_report zhibo_jx_jx_report -d homework_zhibo_report -t tblCourseInterimReportTask ReportTask.sql --sync
{
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": true,
            "msg": "",
            "source": "zhibo_jx_jx_report",
            "worker": "dm-10.xxxxx-3313"
        }
    ]
}

查看信息
» operate-schema get -s zhibo_jx_jx_report zhibo_jx_jx_report   -d homework_zhibo_report  -t tblCourseInterimReportTask

重启任务后目前状态仍然报错,请问该如何处理 ?

重启之后报错信息是什么?辛苦帖下

            "subTaskStatus": [
                {
                    "name": "zhibo_jx_jx_report",
                    "stage": "Paused",
                    "unit": "Sync",
                    "result": {
                        "isCanceled": false,
                        "errors": [
                            {
                                "ErrCode": 44018,
                                "ErrClass": "schema-tracker",
                                "ErrScope": "internal",
                                "ErrLevel": "high",
                                "Message": "startLocation: [position: (, 0), gtid-set: ], endLocation: [position: (mysql-bin.000762, 11437741), gtid-set: 40df2cc0-e9df-11eb-aada-52540038d8c7:1-886581,5a4cb63c-13a7-11ec-a338-5254000e12e9:1-1555111988,6e23e5cb-32e0-11eb-b71a-b8599fc7eafc:1-3234871101,b12e7b9d-32e0-11eb-96f6-525400957a33:1-10209140,db20c319-32e0-11eb-94cc-b8599fc7eae0:1-246890215]: gen insert sqls failed, sourceTable: `homework_zhibo_report`.`tblCourseInterimReportTask`, targetTable: `homework_zhibo_report`.`tblCourseInterimReportTask`: failed to mock downstream table by create table statement CREATE TABLE `tblCourseInterimReportTask` (\
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\
  `course_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '课程ID',\
  `num` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '第几次阶段报告',\
  `task_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '任务状态  -1无效 0有效 1已生成',\
  `ext_data` varchar(20000) NOT NULL DEFAULT '0' COMMENT '扩展字段',\
  `execute_lesson_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '本阶段最后一个章节',\
  `execute_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '预计执行时间',\
  `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '进入队列时间',\
  PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */,\
  UNIQUE KEY `UK_coursId_num` (`course_id`,`num`,`task_status`),\
  UNIQUE KEY `UK_execute_lesson_id` (`execute_lesson_id`,`task_status`),\
  KEY `IDX_taskStatus_executeTime` (`task_status`,`execute_time`)\
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=48936 COMMENT='阶段报告任务表' in schema tracker",
                                "RawCause": "[types:1074]Column length too big for column 'ext_data' (max = 16383); use BLOB or TEXT instead",
                                "Workaround": ""
                            }
                        ],

flush 之后重启任务,还是一样的报错


这个问题记录了一个 github issue,具体进度可以关注:

https://github.com/pingcap/tiflow/issues/4637

2 个赞

增加字段的长度或者使用BLOB、TEXT类型

1 个赞

好像后面的截图中已经修改成了text,还是报错的,能查这个字段对应的值的最大长度吗?

2 个赞

能提供一下mysql5.7.24中这个表字段值的示例吗?

1 个赞

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。