开发者社区> 问答> 正文

异常:fetch failed by table meta,版本1.0.26,tsdb.enable

原sql是对表card_record 进行了两次alter操作 alter table card_record modify column customization_id bigint unsigned NOT NULL COMMENT '定制id' | 查看详情 alter table card_record modify column upgraded_customization_id bigint unsigned NOT NULL COMMENT '升级后定制id' | 查看详情

线上一次alter操作步骤是:

1、DROP TABLE IF EXISTS _card_record_gho

2、DROP TABLE IF EXISTS _card_record_del

3、create table yushitai_test._card_record_gho like yushitai_test.card_record

4、alter table yushitai_test._card_record_gho modify column customization_id bigint unsigned NOT NULL COMMENT 'ŚģöŚą∂id'

5、insert 数据到_card_record_gho

6、rename table yushitai_test.card_record to yushitai_test._card_record_del yushitai_test._card_record_gho to yushitai_test.card_record

手动设置位点到两条alter操作时间之前,重新消费时,当执行第二次alter 操作时,到步骤5时,会出现exception: fetch failed by table meta:yushitai_test._card_record_gho

2018-05-14 15:32:44.078 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : DROP TABLE IF EXISTS _card_record_gho /* generated by server / 2018-05-14 15:32:44.078 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : DROP TABLE IF EXISTS _card_record_del / generated by server / 2018-05-14 15:32:44.078 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : DROP TABLE IF EXISTS _card_record_ghc / generated by server / 2018-05-14 15:32:44.079 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : create / gh-ost / table yushitai_test._card_record_ghc ( id bigint auto_increment, last_update timestamp not null DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, hint varchar(64) charset ascii not null, value varchar(255) charset ascii not null, primary key(id), unique key hint_uidx(hint) ) auto_increment=256 2018-05-14 15:32:44.079 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : create / gh-ost / table yushitai_test._card_record_gho like yushitai_test.card_record 2018-05-14 15:32:44.080 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : alter / gh-ost / table yushitai_test._card_record_gho modify column customization_id bigint unsigned NOT NULL COMMENT 'ŚģöŚą∂id' 2018-05-14 15:32:44.085 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : create / gh-ost / table yushitai_test._card_record_del ( id int auto_increment primary key ) engine=InnoDB comment='ghost-cut-over-sentry' 2018-05-14 15:32:44.090 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : DROP TABLE IF EXISTS _card_record_del / generated by server / 2018-05-14 15:32:44.090 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : rename / gh-ost / table yushitai_test.card_record to yushitai_test._card_record_del, yushitai_test._card_record_gho to yushitai_test.card_record 2018-05-14 15:32:44.091 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : DROP TABLE IF EXISTS _card_record_ghc / generated by server / 2018-05-14 15:32:44.104 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : rename table _card_record_del to _card_record_del_bak20180508125310 2018-05-14 15:32:45.093 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : DROP TABLE IF EXISTS _card_record_gho / generated by server / 2018-05-14 15:32:45.094 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : DROP TABLE IF EXISTS _card_record_del / generated by server / 2018-05-14 15:32:45.094 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : DROP TABLE IF EXISTS _card_record_ghc / generated by server / 2018-05-14 15:32:45.096 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : create / gh-ost / table yushitai_test._card_record_ghc ( id bigint auto_increment, last_update timestamp not null DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, hint varchar(64) charset ascii not null, value varchar(255) charset ascii not null, primary key(id), unique key hint_uidx(hint) ) auto_increment=256 2018-05-14 15:32:45.096 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : create / gh-ost / table yushitai_test._card_record_gho like yushitai_test.card_record 2018-05-14 15:32:45.097 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : alter / gh-ost */ table yushitai_test._card_record_gho modify column upgraded_customization_id bigint unsigned NOT NULL COMMENT 'ŚćáÁļߌźéŚģöŚą∂id' 2018-05-14 15:32:45.103 [destination = yushitai_test , address = /10.32.200.228:5002 , EventParser] WARN c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - ERROR ## parse this event has an error , last position : [EntryPosition[included=false,journalName=mysql-bin.000056,position=286998741,serverId=32114196,timestamp=1525755246000]] com.alibaba.otter.canal.parse.exception.CanalParseException: parse row data failed. Caused by: com.alibaba.otter.canal.parse.exception.CanalParseException: com.alibaba.otter.canal.parse.exception.CanalParseException: fetch failed by table meta:yushitai_test._card_record_gho Caused by: com.alibaba.otter.canal.parse.exception.CanalParseException: fetch failed by table meta:yushitai_test._card_record_gho Caused by: java.io.IOException: ErrorPacket [errorNumber=1146, fieldCount=-1, message=Table 'yushitai_test._card_record_gho' doesn't exist, sqlState=42S02, sqlStateMarker=#] with command: show create table yushitai_test._card_record_gho at com.alibaba.otter.canal.parse.driver.mysql.MysqlQueryExecutor.query(MysqlQueryExecutor.java:61) ~[canal.parse.driver-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.query(MysqlConnection.java:94) [canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.TableMetaCache.getTableMeta(TableMetaCache.java:167) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.getTableMeta(LogEventConvert.java:759) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parseRowsEvent(LogEventConvert.java:428) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parse(LogEventConvert.java:114) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parse(LogEventConvert.java:66) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser.parseAndProfilingIfNecessary(AbstractEventParser.java:337) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3$1.sink(AbstractEventParser.java:184) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:152) [canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:220) [canal.parse-1.0.26-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]

原提问者GitHub用户yueapple

展开
收起
绿子直子 2023-05-09 10:29:43 64 0
1 条回答
写回答
取消 提交回答
  • 定位为一个ddl解析bug

    原回答者GitHub用户agapple

    2023-05-10 10:00:24
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载