TiDB lighting 导入错误

【 TiDB 使用环境】生产\测试环境\ POC
生产环境
【 TiDB 版本】
5.4.0
【遇到的问题】
TiDB lighting 导入数据报错
【复现路径】做过哪些操作出现的问题
【问题现象及影响】
导入数据失败
【附件】

[2022/05/19 08:55:23.357 +00:00] [INFO] [table_restore.go:317] [“restore engine start”] [table=yqn-health.dry] [engineNumber=0]
[2022/05/19 08:55:23.357 +00:00] [INFO] [table_restore.go:422] [“encode kv data and write start”] [table=yqn-health.dry] [engineNumber=0]
[2022/05/19 08:55:23.357 +00:00] [INFO] [backend.go:346] [“open engine”] [engineTag=yqn-health.dry:0] [engineUUID=c5a48f5f-ff34-51fb-9afc-9537ac94f6de]
[2022/05/19 08:55:23.357 +00:00] [INFO] [version.go:360] [“detect server version”] [type=TiDB] [version=5.4.0]
[2022/05/19 08:55:23.357 +00:00] [INFO] [version.go:360] [“detect server version”] [type=TiDB] [version=5.4.0]
[2022/05/19 08:55:23.357 +00:00] [DEBUG] [restore.go:961] [“update checkpoint”] [table=yqn-health.immune] [engine_id=-1] [new_status=imported] []
[2022/05/19 08:55:23.357 +00:00] [INFO] [version.go:360] [“detect server version”] [type=TiDB] [version=5.4.0]
[2022/05/19 08:55:23.357 +00:00] [INFO] [table_restore.go:270] [“import whole table start”] [table=yqn-health.onset]
[2022/05/19 08:55:23.357 +00:00] [INFO] [restore.go:2482] [“restore file start”] [table=yqn-health.dry] [engineNumber=0] [fileIndex=0] [path=yqn-health.dry.0000000010000.sql:0]
[2022/05/19 08:55:23.358 +00:00] [INFO] [version.go:360] [“detect server version”] [type=TiDB] [version=5.4.0]
[2022/05/19 08:55:23.358 +00:00] [INFO] [table_restore.go:317] [“restore engine start”] [table=yqn-health.onset] [engineNumber=0]
panic: runtime error: index out of range [17] with length 17

goroutine 2234 [running]:
github.com/pingcap/tidb/br/pkg/lightning/backend/tidb.(*tidbEncoder).Encode(0xc0012c6820, 0xc001cb42a0, 0xc001b60000, 0x13, 0x20, 0x1, 0xc001b64000, 0x11, 0x12, 0xc0010e8b13, …)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/backend/tidb/tidb.go:321 +0xfc5
github.com/pingcap/tidb/br/pkg/lightning/restore.(*chunkRestore).encodeLoop(0xc0012d6420, 0x4760048, 0xc0012d0c00, 0xc001cb4240, 0xc0012c2e40, 0xc001cb42a0, 0x4736a58, 0xc0012c6820, 0xc0004f8c00, 0xc001238000, …)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/restore/restore.go:2389 +0x3ad
github.com/pingcap/tidb/br/pkg/lightning/restore.(*chunkRestore).restore(0xc0012d6420, 0x4760048, 0xc0012d0c00, 0xc0012c2e40, 0x0, 0xc0012d6440, 0xc0012d6460, 0xc001238000, 0x0, 0x0)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/restore/restore.go:2484 +0x713
github.com/pingcap/tidb/br/pkg/lightning/restore.(*TableRestore).restoreEngine.func3(0xc001291110, 0xc001238000, 0x3ff0000000000000, 0x4760048, 0xc0012d0c00, 0xc0012c2e40, 0xc000000000, 0xc0012d6440, 0xc0012d6460, 0xc0012910f8, …)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/restore/table_restore.go:542 +0x17e
created by github.com/pingcap/tidb/br/pkg/lightning/restore.(*TableRestore).restoreEngine
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/restore/table_restore.go:534 +0x9a9

  • TiUP Cluster Display 信息
  • TiUP CLuster Edit config 信息
  • TiDB-Overview 监控
  • 对应模块的 Grafana 监控(如有 BR、TiDB-binlog、TiCDC 等)
  • 对应模块日志(包含问题前后 1 小时日志)

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

你怎么导入的? 配置文件可以拿出来看下吗?

按照 https://docs.pingcap.com/zh/tidb/dev/tidb-lightning-configuration 说明适当使用参数

https://github.com/pingcap/tidb/issues/33396 似乎是个已知 bug。不知道您的数据源是否列数比 table schema 的列数要少

ddl 是导入前就创建好了吗? 还是用导出的ddl 知己导入的呢?

该主题在最后一个回复创建后60天后自动关闭。不再允许新的回复。