一个好的问题描述有利于社区小伙伴更快帮你定位到问题,高效解决你的问题
【TiDB 使用环境】生产环境
【TiDB 版本】TiDB v7.5.1
【部署方式】机器部署
【操作系统/CPU 架构/芯片详情】
【机器部署详情】CPU大小/内存大小/磁盘大小
【集群数据量】
【集群节点数】
【问题复现路径】创建TiCDC同步任务,同步到kafka,kafka版本为:2.6.1
【遇到的问题:问题现象及影响】
创建同步任务时报:index not found when verify the table
确认表是存在主键的,最近也没有做过DDL操作。
【资源配置
【复制黏贴 ERROR 报错的日志】
创建changefeed命令:
cdc cli changefeed create --server=****:*** --sink-uri="kafka://***:9092/***?protocol=canal-json&kafka-version=2.6.1&partition-num=3&max-message-bytes=67108864&replication-factor=3" --changefeed-id=sbtest --start-ts=0 --no-confirm=true --config changefeed.toml
cdc.log
[2026/05/27 08:45:52.875 +00:00] [INFO] [pd_service_discovery.go:632] ["[pd] switch leader"] [new-leader=http://****:****] [old-leader=]
[2026/05/27 08:45:52.875 +00:00] [INFO] [pd_service_discovery.go:197] ["[pd] init cluster id"] [cluster-id=7644488402582993315]
[2026/05/27 08:45:52.876 +00:00] [INFO] [client.go:600] ["[pd] changing service mode"] [old-mode=UNKNOWN_SVC_MODE] [new-mode=PD_SVC_MODE]
[2026/05/27 08:45:52.876 +00:00] [INFO] [tso_client.go:230] ["[tso] switch dc tso global allocator serving address"] [dc-location=global] [new-address=http://****:***]
[2026/05/27 08:45:52.880 +00:00] [INFO] [tso_dispatcher.go:318] ["[tso] tso dispatcher created"] [dc-location=global]
[2026/05/27 08:45:52.880 +00:00] [INFO] [client.go:648] ["[pd] service mode changed"] [old-mode=UNKNOWN_SVC_MODE] [new-mode=PD_SVC_MODE]
[2026/05/27 08:45:52.880 +00:00] [ERROR] [tso_dispatcher.go:557] ["[tso] update connection contexts failed"] [dc=global] [error="rpc error: code = Canceled desc = context canceled"]
[2026/05/27 08:45:52.880 +00:00] [INFO] [tso_dispatcher.go:339] ["[tso] exit tso dispatcher"] [dc-location=global]
[2026/05/27 08:45:52.880 +00:00] [INFO] [tso_dispatcher.go:240] ["exit tso dispatcher loop"]
[2026/05/27 08:45:52.880 +00:00] [INFO] [tso_dispatcher.go:186] ["exit tso requests cancel loop"]
[2026/05/27 08:45:52.880 +00:00] [INFO] [pd_service_discovery.go:248] ["[pd] exit member loop due to context canceled"]
[2026/05/27 08:45:52.880 +00:00] [WARN] [resource_manager_client.go:326] ["[resource_manager] get token stream error"] [error="rpc error: code = Canceled desc = context canceled"]
[2026/05/27 08:45:52.880 +00:00] [INFO] [resource_manager_client.go:314] ["[resource manager] exit resource token dispatcher"]
[2026/05/27 08:45:52.880 +00:00] [INFO] [tso_client.go:134] ["closing tso client"]
[2026/05/27 08:45:52.880 +00:00] [INFO] [tso_client.go:139] ["close tso client"]
[2026/05/27 08:45:52.880 +00:00] [INFO] [tso_client.go:150] ["tso client is closed"]
[2026/05/27 08:45:52.880 +00:00] [INFO] [pd_service_discovery.go:294] ["[pd] close pd service discovery client"]
[2026/05/27 08:45:52.884 +00:00] [INFO] [region_cache.go:2658] ["change store resolve state"] [store=1] [addr=****:***] [from=unresolved] [to=resolved] [liveness-state=reachable]
[2026/05/27 08:45:52.886 +00:00] [INFO] [region_cache.go:2658] ["change store resolve state"] [store=4] [addr=****:***] [from=unresolved] [to=resolved] [liveness-state=reachable]
[2026/05/27 08:45:52.888 +00:00] [INFO] [region_cache.go:2658] ["change store resolve state"] [store=13] [addr=****:***] [from=unresolved] [to=resolved] [liveness-state=reachable]
[2026/05/27 08:45:52.903 +00:00] [INFO] [middleware.go:49] [/api/v2/verify_table] [status=500] [method=POST] [path=/api/v2/verify_table] [query=] [ip=****] [user-agent=Go-http-client/1.1] [client-version=v7.5.1] [error="[CDC:ErrDispatcherFailed]index not found when verify the table, table: sbtest.sbtest1, index: "] [error="[CDC:ErrDispatcherFailed]index not found when verify the table, table: sbtest.sbtest1, index: "] [errorVerbose="[CDC:ErrDispatcherFailed]index not found when verify the table, table: sbtest.sbtest1, index: \ngithub.com/pingcap/errors.AddStack\n\tgithub.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/errors.go:174\ngithub.com/pingcap/errors.(*Error).GenWithStack\n\tgithub.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/normalize.go:155\ngithub.com/pingcap/tiflow/cdc/sink/dmlsink/mq/dispatcher.(*EventRouter).VerifyTables\n\tgithub.com/pingcap/tiflow/cdc/sink/dmlsink/mq/dispatcher/event_router.go:140\ngithub.com/pingcap/tiflow/cdc/api/v2.APIV2HelpersImpl.getVerifiedTables\n\tgithub.com/pingcap/tiflow/cdc/api/v2/api_helpers.go:523\ngithub.com/pingcap/tiflow/cdc/api/v2.(*OpenAPIV2).verifyTable\n\tgithub.com/pingcap/tiflow/cdc/api/v2/changefeed.go:360\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/pingcap/tiflow/cdc/api/v2.RegisterOpenAPIV2Routes.ErrorHandleMiddleware.func3\n\tgithub.com/pingcap/tiflow/cdc/api/middleware/middleware.go:65\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/pingcap/tiflow/cdc/api/v2.RegisterOpenAPIV2Routes.LogMiddleware.func2\n\tgithub.com/pingcap/tiflow/cdc/api/middleware/middleware.go:39\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/pingcap/tiflow/cdc/api/v2.RegisterOpenAPIV2Routes.CheckServerReadyMiddleware.func1\n\tgithub.com/pingcap/tiflow/cdc/api/middleware/middleware.go:179\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/gin-gonic/gin.CustomRecoveryWithWriter.func1\n\tgithub.com/gin-gonic/gin@v1.8.1/recovery.go:101\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\tgithub.com/gin-gonic/gin@v1.8.1/gin.go:616\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\tgithub.com/gin-gonic/gin@v1.8.1/gin.go:572\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2938\nnet/http.(*conn).serve\n\tnet/http/server.go:2009\nruntime.goexit\n\truntime/asm_amd64.s:1650"] [duration=31.732512ms]
changefeed.toml
case-sensitive = true
force-replicate = true
[filter]
ignore-txn-start-ts = [1, 2]
rules = [ 'sbtest.*']
[mounter]
worker-num = 16
[sink]
dispatchers = [
{matcher = ['*.*'], partition = "index-value"}
]
sbtest.sbtest1 表结构
sbtest1 | CREATE TABLE `sbtest1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */,
KEY `k_1` (`k`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=605907
【其他附件:截图/日志/监控】