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

schdeuler: Set resource with step for collecting plan #5591

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

CabinfeverB
Copy link
Member

Signed-off-by: Cabinfever_B [email protected]

What problem does this PR solve?

Issue Number: ref #5539
If we determine which stores cannot be targets at the beginning of the scheduling, we should set resource with step.

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 12, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bufferflies
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Oct 12, 2022
@CabinfeverB CabinfeverB requested review from bufferflies and removed request for disksing October 12, 2022 09:35
@@ -23,6 +23,7 @@ type Plan interface {

Clone(ops ...Option) Plan // generate plan for clone option
SetResource(interface{})
SetResourceWithStep(interface{}, int)
Copy link
Contributor

Choose a reason for hiding this comment

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

how about use enum?

@@ -83,3 +84,10 @@ func SetResource(resource interface{}) Option {
plan.SetResource(resource)
}
}

// SetResource is used to generate Resource for plan
func SetResourceWithStep(resource interface{}, step int) Option {
Copy link
Member

Choose a reason for hiding this comment

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

Where is it used?

Copy link
Member Author

Choose a reason for hiding this comment

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

#5544 will need it

@codecov
Copy link

codecov bot commented Oct 12, 2022

Codecov Report

Base: 75.72% // Head: 75.80% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (920b3b5) compared to base (0e8155a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5591      +/-   ##
==========================================
+ Coverage   75.72%   75.80%   +0.07%     
==========================================
  Files         326      326              
  Lines       32249    32253       +4     
==========================================
+ Hits        24422    24449      +27     
+ Misses       5716     5704      -12     
+ Partials     2111     2100      -11     
Flag Coverage Δ
unittests 75.80% <100.00%> (+0.07%) ⬆️

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

Impacted Files Coverage Δ
server/schedule/plan/plan.go 90.00% <100.00%> (+1.11%) ⬆️
server/schedulers/balance_plan.go 86.48% <100.00%> (+3.15%) ⬆️
...erver/config/service_middleware_persist_options.go 91.66% <0.00%> (-8.34%) ⬇️
server/schedulers/hot_region_v2.go 73.68% <0.00%> (-5.85%) ⬇️
server/encryptionkm/key_manager.go 70.11% <0.00%> (-1.60%) ⬇️
server/member/member.go 65.78% <0.00%> (-1.58%) ⬇️
server/region_syncer/server.go 86.26% <0.00%> (-1.10%) ⬇️
server/server.go 75.18% <0.00%> (-0.64%) ⬇️
server/cluster/cluster.go 82.58% <0.00%> (-0.63%) ⬇️
server/cluster/unsafe_recovery_controller.go 78.62% <0.00%> (-0.35%) ⬇️
... and 13 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Cabinfever_B <[email protected]>

address comment

Signed-off-by: Cabinfever_B <[email protected]>

address comment

Signed-off-by: Cabinfever_B <[email protected]>

address comment

Signed-off-by: Cabinfever_B <[email protected]>
Copy link
Contributor

@bufferflies bufferflies left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 12, 2022
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Oct 13, 2022
@CabinfeverB
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

@CabinfeverB: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: a97faab

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 13, 2022
@ti-chi-bot
Copy link
Member

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

At the same time I will also trigger all tests for you:

/run-all-tests

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 merged commit d70a685 into tikv:master Oct 13, 2022
@CabinfeverB CabinfeverB deleted the diagnostic_fix branch October 21, 2022 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants