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

schedule: fix progress cannot display when enabling scheduling service #8334

Merged
merged 5 commits into from
Jun 28, 2024

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jun 27, 2024

What problem does this PR solve?

Issue Number: Close #8331.

What is changed and how does it work?

When enabling scheduling service, use an individual function to check if the cluster is prepared.

Check List

Tests

  • Unit test

Release note

None.

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed dco-signoff: yes Indicates the PR's author has signed the dco. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 27, 2024
@rleungx rleungx requested review from JmPotato, lhy1024 and HuSharp June 27, 2024 06:09
@okJiang
Copy link
Member

okJiang commented Jun 27, 2024

/test pull-integration-realcluster-test

@@ -675,3 +675,70 @@ func (suite *multipleServerTestSuite) TestReElectLeader() {
rc = suite.pdLeader.GetServer().GetRaftCluster()
rc.IsPrepared()
}

func (suite *serverTestSuite) TestOnlineProgress() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit , please move TestOnlineProgress into serverTestSuite scope instead of behind multipleServerTestSuite :)

@HuSharp
Copy link
Member

HuSharp commented Jun 27, 2024

--- FAIL: TestServerTestSuite (49.63s)
    --- FAIL: TestServerTestSuite/TestStoreLimit (0.24s)
        server_test.go:596: 
            	Error Trace:	/home/runner/work/pd/pd/tests/integrations/mcs/scheduling/server_test.go:596
            	            				/home/runner/work/pd/pd/tests/integrations/mcs/scheduling/server_test.go:550
            	Error:      	Should be true
            	Test:       	TestServerTestSuite/TestStoreLimit

ci failed, because API cluster didn't clear the environment (the suite is internally serialized), and the InitRegions called by TestOnlineProgress generated region 2 which is different from TestStoreLimit needed, causing it to fail.

// The number of active regions should be more than total region of all stores * collectFactor
if float64(totalRegionsCnt)*collectFactor > float64(notLoadedFromRegionsCnt) {
// The number of active regions should be more than total region of all stores * CollectFactor
if float64(totalRegionsCnt)*CollectFactor > float64(notLoadedFromRegionsCnt) {
return false
}
for _, store := range c.GetStores() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use the similiar function with isStorePrepared to avoid to maintain the two functions?

rleungx added 4 commits June 28, 2024 10:09
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 28, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 28, 2024

@okJiang: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 28, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HuSharp, lhy1024, okJiang

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

The pull request process is described 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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 28, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 28, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-28 04:05:36.935916833 +0000 UTC m=+951663.421405650: ☑️ agreed by lhy1024.
  • 2024-06-28 08:00:57.033460587 +0000 UTC m=+965783.518949420: ☑️ agreed by HuSharp.

@rleungx
Copy link
Member Author

rleungx commented Jun 28, 2024

/merge

Copy link
Contributor

ti-chi-bot bot commented Jun 28, 2024

@rleungx: We have migrated to builtin LGTM and approve plugins for reviewing.

👉 Please use /approve when you want approve this pull request.

The changes announcement: Proposal: Strengthen configuration change approval.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Copy link
Contributor

ti-chi-bot bot commented Jun 28, 2024

@rleungx: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit d29fd1a into tikv:master Jun 28, 2024
17 checks passed
@rleungx rleungx deleted the fix-progress branch June 28, 2024 08:27
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label Jul 31, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #8471.

ti-chi-bot bot added a commit that referenced this pull request Jul 31, 2024
#8334) (#8471)

close #8331

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pdms: after scale out, online number can't return to 0 even if cluster is balance
5 participants