Error Occurs During Data Import with tidb-lightning, Urgent Urgent Urgent

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb-lightning数据导入是时报错,急急急

| username: Alan

20G data import, error occurred when starting to import data after table initialization, error message as follows:
[ERROR] [restore.go:442] [“the whole procedure failed”] [takeTime=24.2419872s] [error=“[Lightning:PreCheck:ErrPreCheckFailed]tidb-lightning pre-check failed: table(s) [lisx-master.flyway_schema_history, report-server.flyway_schema_history] are not empty;\nRegion distribution is unbalanced, the ratio of the regions count of the store(7) with least regions(36) to the store(4) with most regions(5598) is 0.006430868167202572, but we expect it must not be less than 0.5”]
[2023/09/14 16:20:48.784 +00:00] [ERROR] [main.go:103] [“tidb lightning encountered error stack info”] [error=“[Lightning:PreCheck:ErrPreCheckFailed]tidb-lightning pre-check failed: table(s) [lisx-master.flyway_schema_history, report-server.flyway_schema_history] are not empty;\nRegion distribution is unbalanced, the ratio of the regions count of the store(7) with least regions(36) to the store(4) with most regions(5598) is 0.006430868167202572, but we expect it must not be less than 0.5”] [errorVerbose=“[Lightning:PreCheck:ErrPreCheckFailed]tidb-lightning pre-check failed: table(s) [lisx-master.flyway_schema_history, report-server.flyway_schema_history] are not empty;\nRegion distribution is unbalanced, the ratio of the regions count of the store(7) with least regions(36) to the store(4) with most regions(5598) is 0.006430868167202572, but we expect it must not be less than 0.5\ngithub.com/pingcap/errors.AddStack\n\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/errors.go:174\ngithub.com/pingcap/errors.(*Error).GenWithStackByArgs\n\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/normalize.go:164\ngithub.com/pingcap/tidb/br/pkg/lightning/restore.(*Controller).preCheckRequirements\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/restore/restore.go:1983\ngithub.com/pingcap/tidb/br/pkg/lightning/restore.(*Controller).Run\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/restore/restore.go:419\ngithub.com/pingcap/tidb/br/pkg/lightning.(*Lightning).run\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/lightning.go:473\ngithub.com/pingcap/tidb/br/pkg/lightning.(*Lightning).RunOnceWithOptions\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/lightning.go:329\nmain.main.func2\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/tidb-lightning/main.go:94\nmain.main\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/tidb-lightning/main.go:95\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1594”]

| username: tidb菜鸟一只 | Original post link

Your region count is unbalanced. You can turn off the import check first by setting check-requirements = true.

| username: zhanggame1 | Original post link

If the data volume is not large, you can use logical import.

| username: tidb菜鸟一只 | Original post link

Yes, choose backend = “tidb” for only 20G of data.

| username: Alan | Original post link

Okay, thank you. There are no issues when using TiDB. Yesterday, I used local, and there was this problem.

| username: Kongdom | Original post link

Remember to mark the best answer~ :wink:

| username: Fly-bird | Original post link

Direct import and export

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.