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

Scheduling is blocked for around 5 mins after transferring the PD leader #4769

Closed
rleungx opened this issue Mar 29, 2022 · 2 comments · Fixed by #4875
Closed

Scheduling is blocked for around 5 mins after transferring the PD leader #4769

rleungx opened this issue Mar 29, 2022 · 2 comments · Fixed by #4875

Comments

@rleungx
Copy link
Member

rleungx commented Mar 29, 2022

Bug Report

What did you do?

Transfer PD leader manually.

What did you expect to see?

The scheduling can run immediately after the leader is transferred.

What did you see instead?

:34.066 +08:00] [INFO] [coordinator.go:302] ["coordinator starts to collect cluster information"]
[2022/03/29 14:29:34.068 +08:00] [INFO] [id.go:122] ["idAllocator allocates a new id"] [alloc-id=2000]
[2022/03/29 14:29:34.068 +08:00] [INFO] [util.go:77] ["load cluster version"] [cluster-version=6.0.0-alpha]
[2022/03/29 14:29:34.068 +08:00] [INFO] [server.go:1381] ["PD cluster leader is ready to serve"] [pd-leader-name=pd-0]
[2022/03/29 14:34:29.850 +08:00] [INFO] [grpc_service.go:1375] ["update service GC safe point"] [service-id=gc_worker] [expire-at=9223372036854775807] [safepoint=432153577346301952]
[2022/03/29 14:34:34.067 +08:00] [INFO] [coordinator.go:305] ["coordinator has finished cluster information preparation"]
[2022/03/29 14:34:34.067 +08:00] [INFO] [coordinator.go:315] ["coordinator starts to run schedulers"]
[2022/03/29 14:34:34.068 +08:00] [INFO] [coordinator.go:363] ["create scheduler with independent configuration"] [scheduler-name=balance-hot-region-scheduler]
[2022/03/29 14:34:34.069 +08:00] [INFO] [coordinator.go:363] ["create scheduler with independent configuration"] [scheduler-name=balance-leader-scheduler]
[2022/03/29 14:34:34.070 +08:00] [INFO] [coordinator.go:363] ["create scheduler with independent configuration"] [scheduler-name=balance-region-scheduler]
[2022/03/29 14:34:34.070 +08:00] [INFO] [coordinator.go:385] ["create scheduler"] [scheduler-name=balance-region-scheduler] [scheduler-args="[]"]
[2022/03/29 14:34:34.071 +08:00] [INFO] [coordinator.go:385] ["create scheduler"] [scheduler-name=balance-leader-scheduler] [scheduler-args="[]"]
[2022/03/29 14:34:34.071 +08:00] [INFO] [coordinator.go:385] ["create scheduler"] [scheduler-name=balance-hot-region-scheduler] [scheduler-args="[]"]
[2022/03/29 14:34:34.072 +08:00] [INFO] [coordinator.go:285] ["coordinator begins to actively drive push operator"]
[2022/03/29 14:34:34.072 +08:00] [INFO] [coordinator.go:220] ["coordinator begins to check suspect key ranges"]

It is blocked for around 5 minutes to prepare.

What version of PD are you using (pd-server -V)?

master

@rleungx
Copy link
Member Author

rleungx commented Apr 12, 2022

Caused by #2591. Before we don't sync the leader information, after transferring the PD leader, all regions will be regarded as isNew. After this PR, these regions won't be regarded as isNew, so the prepare checker won't collect these regions.

@rleungx
Copy link
Member Author

rleungx commented Apr 29, 2022

Thanks to @HunDunDM, after discussion with him, I think adding a flag in region info could be a good way to go.

ti-chi-bot added a commit that referenced this issue May 17, 2022
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue May 17, 2022
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue May 17, 2022
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue May 17, 2022
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue May 17, 2022
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue May 17, 2022
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue May 17, 2022
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue May 17, 2022
ti-chi-bot added a commit that referenced this issue Jun 11, 2022
) (#4969)

close #4769, ref #4875

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: Ryan Leung <[email protected]>
ti-chi-bot added a commit that referenced this issue Jun 14, 2022
) (#4974)

close #4769, ref #4875

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: Ryan Leung <[email protected]>
ti-chi-bot added a commit that referenced this issue Jun 22, 2022
) (#4970)

close #4769, ref #4875

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: Ryan Leung <[email protected]>
ti-chi-bot added a commit that referenced this issue Jul 5, 2022
) (#4967)

close #4769, ref #4875

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: Ryan Leung <[email protected]>
ti-chi-bot added a commit that referenced this issue Sep 20, 2022
) (#4973)

close #4769, ref #4875

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: Ryan Leung <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants