ticdc 不采集数据

【 TiDB 使用环境】Poc
【 TiDB 版本】v6.5.2

【遇到的问题:问题现象及影响】
任务创建成功,向tidb中insert、update数据,下游mysql库没有变化; 监控中也没有数据;

表是否有有效索引?

执行cdc cli changefeed query -c c-test-task看下状态

看看cdc日志记录的啥

是不是task_status 有问题,我看监控的table_ids为空

有的,表有主键

没有日志 :rofl:

{
“upstream_id”: 7205161203036295249,
“namespace”: “default”,
“id”: “c-test-task”,
“sink_uri”: “mysql://bigdata_dev:xxxxx@rm-bp1b0x3173wu7w.mysql.rds.aliyuncs.com:3306?time-zone=Asia/Shanghai”,
“config”: {
“case_sensitive”: true,
“enable_old_value”: true,
“force_replicate”: false,
“ignore_ineligible_table”: false,
“check_gc_safe_point”: true,
“enable_sync_point”: false,
“bdr_mode”: false,
“sync_point_interval”: 600000000000,
“sync_point_retention”: 86400000000000,
“filter”: {
“rules”: [
“db_canvas.e_participation_record”,
“db_canvas.canvas_nc”
],
“event_filters”: null
},
“mounter”: {
“worker_num”: 16
},
“sink”: {
“protocol”: “”,
“schema_registry”: “”,
“csv”: {
“delimiter”: “,”,
“quote”: “"”,
“null”: “\N”,
“include_commit_ts”: false
},
“column_selectors”: null,
“transaction_atomicity”: “none”,
“encoder_concurrency”: 16,
“terminator”: “\r\n”,
“date_separator”: “day”,
“enable_partition_separator”: true
},
“consistent”: {
“level”: “none”,
“max_log_size”: 64,
“flush_interval”: 2000,
“storage”: “”
}
},
“create_time”: “2023-11-29 16:56:26.301”,
“start_ts”: 445971741540352000,
“resolved_ts”: 445973270780182530,
“target_ts”: 0,
“checkpoint_tso”: 445973270780182530,
“checkpoint_time”: “2023-11-29 18:16:56.587”,
“sort_engine”: “unified”,
“state”: “normal”,
“error”: null,
“error_history”: null,
“creator_version”: “”,
“task_status”: [
{
“capture_id”: “3183ecc6-1475-4a3b-a0f5-0144e8c81544”,
“table_ids”: [],
“table_operations”: null
},
{
“capture_id”: “337f63a2-e74d-4fde-812d-45fb04ee3474”,
“table_ids”: [],
“table_operations”: null
}
]
}

如果状态正常,就确认一下相关过滤规则,配置是否正确

可以看到应该是过滤那配置有问题,checkpoint正常推进,任务中没有table:
“task_status”: [
{
“capture_id”: “3183ecc6-1475-4a3b-a0f5-0144e8c81544”,
“table_ids”: [],
“table_operations”: null
},
{
“capture_id”: “337f63a2-e74d-4fde-812d-45fb04ee3474”,
“table_ids”: [],
“table_operations”: null
}
]
}

过滤规则只有上游的过滤,下游的怎么过滤呢

嗯,看着是table_ids这里的问题,是配置文件整错了吗?能否发一份配置文件?

看着不像配置文件整错了,上游tidb查下这个
select table_schema,table_name from information_schema.tables where lower(table_name) in (‘e_participation_record’,‘canvas_nc’) and lower(table_schema)=‘db_canvas’;


帮忙看看呢

很奇怪,执行下这个呢,select table_schema,table_name,table_type from information_schema.tables where lower(table_name) in (‘e_participation_record’,‘canvas_nc’) and lower(table_schema)=‘db_canvas’;


能否加个v ,帮忙看下呢

cdc都没有日志,说明都没有建立连接啊

不知道咋回事了,你在确认下环境吧,–server后跟的对不对

cdc有日志了,之前找错目录了。日志看着也是正常了,有puller相关信息

上午把filter关闭了,也就是整库同步,table_ids就有值了,但还是没有数据过来