-
Notifications
You must be signed in to change notification settings - Fork 725
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
Conversation
/test pull-integration-realcluster-test |
@@ -675,3 +675,70 @@ func (suite *multipleServerTestSuite) TestReElectLeader() { | |||
rc = suite.pdLeader.GetServer().GetRaftCluster() | |||
rc.IsPrepared() | |||
} | |||
|
|||
func (suite *serverTestSuite) TestOnlineProgress() { |
There was a problem hiding this comment.
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 :)
--- 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() { |
There was a problem hiding this comment.
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?
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@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. |
[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 |
/merge |
@rleungx: We have migrated to builtin 👉 Please use
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. |
@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. |
In response to a cherrypick label: new pull request created to branch |
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
Release note