Skip to content

cluster: wait for PD finish loading regions after PD restart or upgrade #2521

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

djshow832
Copy link
Contributor

@djshow832 djshow832 commented Mar 25, 2025

What problem does this PR solve?

close #2461

What is changed and how it works?

When checking PD health, also check pd/api/v2/ready to see if regions are loaded.
This applies to both upgrade and reload.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

- Wait for PD finish loading regions after PD restart or upgrade

@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 25, 2025
@ti-chi-bot ti-chi-bot bot requested a review from nexustar March 25, 2025 11:20
Copy link
Contributor

ti-chi-bot bot commented Mar 25, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign xhebox for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 25, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2025

Codecov Report

Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.

Project coverage is 45.62%. Comparing base (e8c63c6) to head (9151b59).

Current head 9151b59 differs from pull request most recent head 3ee0646

Please upload reports for the commit 3ee0646 to get more accurate results.

Files with missing lines Patch % Lines
pkg/cluster/api/pdapi.go 0.00% 25 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2521      +/-   ##
==========================================
- Coverage   45.65%   45.62%   -0.03%     
==========================================
  Files         337      337              
  Lines       36436    36460      +24     
==========================================
- Hits        16633    16632       -1     
- Misses      17774    17799      +25     
  Partials     2029     2029              
Flag Coverage Δ
tiup 33.81% <ø> (ø)
unittest 21.61% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure pd leader is ready to serve when rolling update pd
2 participants