Data Recovery Anomalies

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

Original topic: 数据恢复异常

| username: usretyn

[TiDB Usage Environment] Test Environment
[TiDB Version] v5.3.1
[Reproduction Path] Operations performed that led to the issue
[Encountered Issue: Issue Phenomenon and Impact]
BR backup data restored in another cluster, the backup data is around 5GB. Error occurred during the restoration process.
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
[2023/03/03 12:20:48.655 +08:00] [INFO] [collector.go:65] [“Full restore failed summary”] [total-ranges=285] [ranges-succeed=284] [ranges-failed=1] [restore-checksum=5.598639424s] [split-region=19.017854016s] [restore-ranges=9028] [unit-name=file] [error=“rpc error: code = Unknown desc = rpc error: code = Unavailable desc = not leader”] [errorVerbose=“rpc error: code = Unknown desc = rpc error: code = Unavailable desc = not leader\ngithub.com/tikv/pd/client.(*client).ScanRegions\n\t/nfs/cache/mod/github.com/tikv/pd@v1.1.0-beta.0.20211104095303-69c86d05d379/client/client.go:1427\ngithub.com/pingcap/tidb/br/pkg/restore.(*pdClient).ScanRegions\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/split_client.go:459\ngithub.com/pingcap/tidb/br/pkg/restore.PaginateScanRegion.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/split.go:400\ngithub.com/pingcap/tidb/br/pkg/utils.WithRetry\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/utils/retry.go:58\ngithub.com/pingcap/tidb/br/pkg/restore.PaginateScanRegion\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/split.go:396\ngithub.com/pingcap/tidb/br/pkg/restore.(*FileImporter).Import.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/import.go:301\ngithub.com/pingcap/tidb/br/pkg/utils.WithRetry\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/utils/retry.go:58\ngithub.com/pingcap/tidb/br/pkg/restore.(*FileImporter).Import\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/import.go:297\ngithub.com/pingcap/tidb/br/pkg/restore.(*Client).RestoreFiles.func2\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/client.go:640\ngithub.com/pingcap/tidb/br/pkg/utils.(*WorkerPool).ApplyOnErrorGroup.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/utils/worker.go:73\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/nfs/cache/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/errgroup/errgroup.go:57\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371”]
Error: rpc error: code = Unknown desc = rpc error: code = Unavailable desc = not leader

| username: 裤衩儿飞上天 | Original post link

Could you describe it in more detail? The recovery environment and process.

| username: 考试没答案 | Original post link

Please send the backup and restore commands.

| username: ffeenn | Original post link

Display the PD and take a screenshot of the Overview monitoring panel.