开发者社区> 问答> 正文

使用mysql-cdc 的scan.startup.mode = specific-offset的读

Hi all: 最近用mysql-cdc的方式,使用Flink-sql整合数据,table的部分配置如下 'debezium.min.row.count.to.stream.results'='1000', 'scan.startup.mode'='specific-offset', 'scan.startup.specific-offset.file'='mybinlog.000029', 'scan.startup.specific-offset.pos'='542607677' 在上述稳定运行接分钟之后,异常抛出了以下错误: org.apache.kafka.connect.errors.ConnectException: The connector is trying to read binlog starting at GTIDs 36b8bd0f-a435-11eb-9962-b4055d9ecb74:21820662-21926801,d713fc3c-afc6-11eb-a7b8-b4055d9ec5e6:185910-192349 and binlog file 'mybinlog.000029', pos=808323397, skipping 6 events plus 1 rows, but this is no longer available on the server. Reconfigure the connector to use a snapshot when needed. at io.debezium.connector.mysql.MySqlConnectorTask.start(MySqlConnectorTask.java:133) at io.debezium.connector.common.BaseSourceTask.start(BaseSourceTask.java:106) at io.debezium.embedded.EmbeddedEngine.run(EmbeddedEngine.java:758) at io.debezium.embedded.ConvertingEngineBuilder$2.run(ConvertingEngineBuilder.java:171) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622) at java.lang.Thread.run(Thread.java:834) 请问是什么情况下导致这个问题。*来自志愿者整理的flink邮件归档

展开
收起
EXCEED 2021-12-02 14:24:14 1448 0
1 条回答
写回答
取消 提交回答
  • 我也遇到了这种情况,可能是你们的db做了主从切换。 因为binlog每台服务器的pos都不一样。 mysql5.6以后支持了GTID的同步方式,这个是全局唯一的。但是目前mysql-cdc貌似还不支持。 我目前的解决方案是出错后从最后的位置开始消费,可能会丢失一部分数据。*来自志愿者整理的FLINK邮件归档

    2021-12-02 14:39:45
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Bringing MySQL Compatibility to HBase using Database Virtualization 立即下载
MongoShake -- Multi Active-Active and Cross-Region Disaster Recoverable MongoDB Service 立即下载
Spark SQL: Another 16x faster aFer Tungsten SPARC processor has drama1c advantages over x86 on Apache Spark 立即下载