【 TiDB 使用环境】生产环境
【 TiDB 版本】v5.4.0
【复现路径】
【遇到的问题:问题现象及影响】br进行表恢复到目标库表时,源表上没有索引,目标表先添加索引,再使用br导入时,就会报出上面的错误。
br导入报错:
# tiup br restore full --pd "10.3.x.222:2379" --filter 'bj_sjzt_db.zhcx*incoming_alldata' --storage "local:///data/backup/backup_2023-02-17_bj_sjzt_db" --ratelimit 128 --log-file bj_sjzt_db_2tabs_restore.log
tiup is checking updates for component br ...
Starting component `br`: /root/.tiup/components/br/v5.4.0/br /root/.tiup/components/br/v5.4.0/br restore full --pd 10.3.x.222:2379 --filter bj_sjzt_db.zhcx*incoming_alldata --storage local:///data/backup/backup_2023-02-17_bj_sjzt_db --ratelimit 128 --log-file bj_sjzt_db_2tabs_restore.log
Detail BR log in bj_to_tj_2tabs_restore.log
Full restore <-------------------------------------------------------------------|...........................> 71.33%
panic: index not found in origin table, please check the restore table has the same index info with origin table
goroutine 14829 [running]:
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000a52000, 0xc000fba000, 0x5, 0x5)
/nfs/cache/mod/go.uber.org/zap@v1.19.1/zapcore/entry.go:232 +0x532
go.uber.org/zap.(*Logger).Panic(0xc002ede360, 0x3c19f45, 0x69, 0xc000fba000, 0x5, 0x5)
/nfs/cache/mod/go.uber.org/zap@v1.19.1/logger.go:230 +0x85
github.com/pingcap/log.Panic(0x3c19f45, 0x69, 0xc000fba000, 0x5, 0x5)
/nfs/cache/mod/github.com/pingcap/log@v0.0.0-20210906054005-afc726e70354/global.go:54 +0x10b
github.com/pingcap/tidb/br/pkg/checksum.buildRequest(0xc000b24340, 0x15ce, 0xc00181a5f0, 0x632, 0x6197b12691c0001, 0x4, 0xc0008758f8, 0x127405c, 0x56ed0a0, 0xc0015cf380, ...)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/checksum/executor.go:132 +0x845
br恢复时,有没有可以象lightning那种参数,如果表已经存在,就忽略不创建表,只导入数据?
【资源配置】
【附件:截图/日志/监控】