Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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\ngithub.com/tikv/pd/client.(*client).ScanRegions\n\tgithub.com/tikv/pd@v0.0.0-20210105112549-e5be7fd38659/client/client.go:598\ngithub.com/pingcap/br/pkg/restore.(*pdClient).ScanRegions\n\tgithub.com/pingcap/br@/pkg/restore/split_client.go:385\ngithub.com/pingcap/br/pkg/restore.PaginateScanRegion\n\tgithub.com/pingcap/br@/pkg/restore/util.go:491\ngithub.com/pingcap/br/pkg/restore.(*RegionSplitter).Split\n\tgithub.com/pingcap/br@/pkg/restore/split.go:103\ngithub.com/pingcap/br/pkg/restore.SplitRanges\n\tgithub.com/pingcap/br@/pkg/restore/util.go:432\ngithub.com/pingcap/br/pkg/restore.(*tikvSender).splitWorker\n\tgithub.com/pingcap/br@/pkg/restore/pipeline_items.go:234\nruntime.goexit\n\truntime/asm_amd64.s:1357”] [stack=“main.runRestoreCommand\n\tgithub.com/pingcap/br@/cmd/br/restore.go:26\nmain.newFullRestoreCommand.func1\n\tgithub.com/pingcap/br@/cmd/br/restore.go:97\ngithub.com/spf13/cobra.(*Command 1).execute\n\tgithub.com/spf13/cobra@v1.0.0/command.go:842\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.0.0/command.go:950\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v1.0.0/command.go:887\nmain.main\n\tgithub.com/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\ngithub.com/tikv/pd/client.(*client).ScanRegions\n\tgithub.com/tikv/pd@v0.0.0-20210105112549-e5be7fd38659/client/client.go:598\ngithub.com/pingcap/br/pkg/restore.(*pdClient).ScanRegions\n\tgithub.com/pingcap/br@/pkg/restore/split_client.go:385\ngithub.com/pingcap/br/pkg/restore.PaginateScanRegion\n\tgithub.com/pingcap/br@/pkg/restore/util.go:491\ngithub.com/pingcap/br/pkg/restore.(*RegionSplitter).Split\n\tgithub.com/pingcap/br@/pkg/restore/split.go:103\ngithub.com/pingcap/br/pkg/restore.SplitRanges\n\tgithub.com/pingcap/br@/pkg/restore/util.go:432\ngithub.com/pingcap/br/pkg/restore.(*tikvSender).splitWorker\n\tgithub.com/pingcap/br@/pkg/restore/pipeline_items.go:234\nruntime.goexit\n\truntime/asm_amd64.s:1357”] [stack=“main.main\n\tgithub.com/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 join this conversation on GitHub. Already have an account? Sign in to comment