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

br restore failed with error “region 714153's leader's store id is 0” when pd rolling restart #53724

Closed
Lily2025 opened this issue May 31, 2024 · 2 comments
Assignees
Labels
affects-6.5 affects-7.1 affects-7.5 component/br This issue is related to BR of TiDB. severity/major type/bug This issue is a bug.

Comments

@Lily2025
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

1、br restore
2、pd rolling restart

2. What did you expect to see? (Required)

br restore success

3. What did you see instead (Required)

br restore failed
error="region 714153's leader's store id is 0: [BR:PD:ErrPDBatchScanRegion]batch scan region; region 714153's leader's store id is 0: [BR:PD:ErrPDBatchScanRegion]batch scan region; region 714153's leader's store id is 0: [BR:PD:ErrPDBatchScanRegion]batch scan region; region 714153's leader's store id is 0: [BR:PD:ErrPDBatchScanRegion]batch scan region"] [errorVerbose="the following errors occurred:\n - [BR:PD:ErrPDBatchScanRegion]batch scan region\n region 714153's leader's store id is 0\n github.com/pingcap/tidb/br/pkg/restore/split.CheckRegionConsistency\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:76\n github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion.func1\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:147\n github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n \t/workspace/source/tidb/br/pkg/utils/retry.go:217\n github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n \t/workspace/source/tidb/br/pkg/utils/retry.go:235\n github.com/pingcap/tidb/br/pkg/utils.WithRetry\n \t/workspace/source/tidb/br/pkg/utils/retry.go:216\n github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:117\n github.com/pingcap/tidb/br/pkg/restore.(*FileImporter).ImportSSTFiles.func1\n \t/workspace/source/tidb/br/pkg/restore/import.go:548\n github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n \t/workspace/source/tidb/br/pkg/utils/retry.go:217\n github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n \t/workspace/source/tidb/br/pkg/utils/retry.go:235\n github.com/pingcap/tidb/br/pkg/utils.WithRetry\n \t/workspace/source/tidb/br/pkg/utils/retry.go:216\n github.com/pingcap/tidb/br/pkg/restore.(*FileImporter).ImportSSTFiles\n \t/workspace/source/tidb/br/pkg/restore/import.go:544\n github.com/pingcap/tidb/br/pkg/restore.(*Client).RestoreSSTFiles.func2.1\n \t/workspace/source/tidb/br/pkg/restore/client.go:1458\n github.com/pingcap/tidb/br/pkg/restore.(*Client).RestoreSSTFiles.func2\n \t/workspace/source/tidb/br/pkg/restore/client.go:1459\n github.com/pingcap/tidb/br/pkg/utils.(*WorkerPool).ApplyOnErrorGroup.func1\n \t/workspace/source/tidb/br/pkg/utils/worker.go:76\n golang.org/x/sync/errgroup.(*Group).Go.func1\n \t/root/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75\n runtime.goexit\n \t/usr/local/go/src/runtime/asm_amd64.s:1650\n - [BR:PD:ErrPDBatchScanRegion]batch scan region\n region 714153's leader's store id is 0\n github.com/pingcap/tidb/br/pkg/restore/split.CheckRegionConsistency\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:76\n github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion.func1\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:147\n github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n \t/workspace/source/tidb/br/pkg/utils/retry.go:217\n github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n \t/workspace/source/tidb/br/pkg/utils/retry.go:235\n github.com/pingcap/tidb/br/pkg/utils.WithRetry\n \t/workspace/source/tidb/br/pkg/utils/retry.go:216\n github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:117\n github.com/pingcap/tidb/br/pkg/restore.(*FileImporter).ImportSSTFiles.func1\n \t/workspace/source/tidb/br/pkg/restore/import.go:548\n github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n \t/workspace/source/tidb/br/pkg/utils/retry.go:217\n github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n \t/workspace/source/tidb/br/pkg/utils/retry.go:235\n github.com/pingcap/tidb/br/pkg/utils.WithRetry\n \t/workspace/source/tidb/br/pkg/utils/retry.go:216\n github.com/pingcap/tidb/br/pkg/restore.(*FileImporter).ImportSSTFiles\n \t/workspace/source/tidb/br/pkg/restore/import.go:544\n github.com/pingcap/tidb/br/pkg/restore.(*Client).RestoreSSTFiles.func2.1\n \t/workspace/source/tidb/br/pkg/restore/client.go:1458\n github.com/pingcap/tidb/br/pkg/restore.(*Client).RestoreSSTFiles.func2\n \t/workspace/source/tidb/br/pkg/restore/client.go:1459\n github.com/pingcap/tidb/br/pkg/utils.(*WorkerPool).ApplyOnErrorGroup.func1\n \t/workspace/source/tidb/br/pkg/utils/worker.go:76\n golang.org/x/sync/errgroup.(*Group).Go.func1\n \t/root/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75\n runtime.goexit\n \t/usr/local/go/src/runtime/asm_amd64.s:1650\n - [BR:PD:ErrPDBatchScanRegion]batch scan region\n region 714153's leader's store id is 0\n github.com/pingcap/tidb/br/pkg/restore/split.CheckRegionConsistency\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:76\n github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion.func1\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:147\n github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n \t/workspace/source/tidb/br/pkg/utils/retry.go:217\n github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n \t/workspace/source/tidb/br/pkg/utils/retry.go:235\n github.com/pingcap/tidb/br/pkg/utils.WithRetry\n \t/workspace/source/tidb/br/pkg/utils/retry.go:216\n github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:117\n github.com/pingcap/tidb/br/pkg/restore.(*FileImporter).ImportSSTFiles.func1\n \t/workspace/source/tidb/br/pkg/restore/import.go:548\n github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n \t/workspace/source/tidb/br/pkg/utils/retry.go:217\n github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n \t/workspace/source/tidb/br/pkg/utils/retry.go:235\n github.com/pingcap/tidb/br/pkg/utils.WithRetry\n \t/workspace/source/tidb/br/pkg/utils/retry.go:216\n github.com/pingcap/tidb/br/pkg/restore.(*FileImporter).ImportSSTFiles\n \t/workspace/source/tidb/br/pkg/restore/import.go:544\n github.com/pingcap/tidb/br/pkg/restore.(*Client).RestoreSSTFiles.func2.1\n \t/workspace/source/tidb/br/pkg/restore/client.go:1458\n github.com/pingcap/tidb/br/pkg/restore.(*Client).RestoreSSTFiles.func2\n \t/workspace/source/tidb/br/pkg/restore/client.go:1459\n github.com/pingcap/tidb/br/pkg/utils.(*WorkerPool).ApplyOnErrorGroup.func1\n \t/workspace/source/tidb/br/pkg/utils/worker.go:76\n golang.org/x/sync/errgroup.(*Group).Go.func1\n \t/root/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75\n runtime.goexit\n \t/usr/local/go/src/runtime/asm_amd64.s:1650\n - [BR:PD:ErrPDBatchScanRegion]batch scan region\n region 714153's leader's store id is 0\n github.com/pingcap/tidb/br/pkg/restore/split.CheckRegionConsistency\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:76\n github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion.func1\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:147\n github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n \t/workspace/source/tidb/br/pkg/utils/retry.go:217\n github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n \t/workspace/source/tidb/br/pkg/utils/retry.go:235\n github.com/pingcap/tidb/br/pkg/utils.WithRetry\n \t/workspace/source/tidb/br/pkg/utils/retry.go:216\n github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion\n \t/workspace/source/tidb/br/pkg/restore/split/split.go:117\n github.com/pingcap/tidb/br/pkg/restore.(*FileImporter).ImportSSTFiles.func1\n \t/workspace/source/tidb/br/pkg/restore/import.go:548\n github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n \t/workspace/source/tidb/br/pkg/utils/retry.go:217\n github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n \t/workspace/source/tidb/br/pkg/utils/retry.go:235\n github.com/pingcap/tidb/br/pkg/utils.WithRetry\n \t/workspace/source/tidb/br/pkg/utils/retry.go:216\n github.com/pingcap/tidb/br/pkg/restore.(*FileImporter).ImportSSTFiles\n \t/workspace/source/tidb/br/pkg/restore/import.go:544\n github.com/pingcap/tidb/br/pkg/restore.(*Client).RestoreSSTFiles.func2.1\n \t/workspace/source/tidb/br/pkg/restore/client.go:1458\n github.com/pingcap/tidb/br/pkg/restore.(*Client).RestoreSSTFiles.func2\n \t/workspace/source/tidb/br/pkg/restore/client.go:1459\n github.com/pingcap/tidb/br/pkg/utils.(*WorkerPool).ApplyOnErrorGroup.func1\n \t/workspace/source/tidb/br/pkg/utils/worker.go:76\n golang.org/x/sync/errgroup.(*Group).Go.func1\n \t/root/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75\n runtime.goexit\n \t/usr/local/go/src/runtime/asm_amd64.s:1650"] Error: region 714153's leader's store id is 0: [BR:PD:ErrPDBatchScanRegion]batch scan region; region 714153's leader's store id is 0: [BR:PD:ErrPDBatchScanRegion]batch scan region; region 714153's leader's store id is 0: [BR:PD:ErrPDBatchScanRegion]batch scan region; region 714153's leader's store id is 0: [BR:PD:ErrPDBatchScanRegion]batch scan region

4. What is your TiDB version? (Required)

tidb version:
./tidb-server -V
Release Version: v7.5.2
Edition: Community
Git Commit Hash: 39ea2b3
Git Branch: HEAD
UTC Build Time: 2024-05-29 15:07:12
GoVersion: go1.21.10
Race Enabled: false
Check Table Before Drop: false
Store: unistore
2024-05-30T14:14:32.686+0800

@Lily2025 Lily2025 added the type/bug This issue is a bug. label May 31, 2024
@Lily2025
Copy link
Author

/type bug
/severity major
/assign 3pointer

@Lily2025 Lily2025 changed the title br restore failed when pd rolling restart br restore failed with error “region 714153's leader's store id is 0” when pd rolling restart May 31, 2024
@BornChanger BornChanger added affects-7.5 component/br This issue is related to BR of TiDB. labels Jun 3, 2024
@Leavrth
Copy link
Contributor

Leavrth commented Jul 8, 2024

#51124
#50501

@Leavrth Leavrth closed this as completed Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.1 affects-7.5 component/br This issue is related to BR of TiDB. severity/major type/bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants