-
Notifications
You must be signed in to change notification settings - Fork 721
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
scheduler: use move-hot-write-leader operator #7852
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7852 +/- ##
==========================================
- Coverage 77.25% 77.22% -0.04%
==========================================
Files 468 468
Lines 60937 60872 -65
==========================================
- Hits 47078 47009 -69
- Misses 10302 10307 +5
+ Partials 3557 3556 -1
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: lhy1024 <[email protected]>
1f9e78d
to
bb3a7bd
Compare
Signed-off-by: lhy1024 <[email protected]>
// peer in store 1 of the region 2 can transfer to store 5 or store 6 because of the label | ||
operatorutil.CheckTransferPeerWithLeaderTransferFrom(re, op, operator.OpHotRegion, 1) | ||
} else { | ||
re.Equal("move-hot-write-leader", op.Desc()) | ||
re.Equal(5, op.Len()) |
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.
why is the length different?
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.
#7872 Move leader without joint will appear as an extra transfer leader, I'll try to adjust the test firstly to make it look more reasonable
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
} else { | ||
re.Equal("move-hot-write-leader", op.Desc()) |
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.
no need it?
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
@@ -5881,6 +5881,21 @@ | |||
"intervalFactor": 1, | |||
"legendFormat": "store-{{store}}-in", | |||
"refId": "B" | |||
}, | |||
{ | |||
"expr": "- sum(delta(pd_scheduler_hot_region_direction{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\",type=\"move-leader\",direction=\"out\",rw=\"write\"}[1m]))by (store)", |
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.
can you paste the grafana pic?
"expr": "- sum(delta(pd_scheduler_hot_region_direction{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\",type=\"move-leader\",direction=\"out\",rw=\"write\"}[1m]))by (store)", | |
"expr": "sum(delta(pd_scheduler_hot_region_direction{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", store=~\"$store\",type=\"move-leader\",direction=\"out\",rw=\"write\"}[1m]))by (store)", |
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.
It should be negative, because its direction is out
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.
got it.
@@ -88,32 +104,36 @@ func CheckTransferLearner(re *require.Assertions, op *operator.Operator, kind op | |||
// CheckTransferPeerWithLeaderTransfer checks if the operator is to transfer | |||
// peer between the specified source and target stores and it meanwhile | |||
// transfers the leader out of source store. | |||
// If targetID is 0, it means the operator is to transfer peer to any store. | |||
func CheckTransferPeerWithLeaderTransfer(re *require.Assertions, op *operator.Operator, kind operator.OpKind, sourceID, targetID uint64) { |
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.
Do we need to add more comments to indicate these functions are used for the test?
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.
Maybe I will refactor them in another pr.
/merge |
@lhy1024: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
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. |
This pull request has been accepted and is ready to merge. Commit hash: b7fc80e
|
@lhy1024: 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 |
close tikv#7848 Signed-off-by: ti-chi-bot <[email protected]>
close #7848 Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: lhy1024 <[email protected]> Co-authored-by: lhy1024 <[email protected]> Co-authored-by: lhy1024 <[email protected]>
close tikv#7848 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
close #7848 Signed-off-by: lhy1024 <[email protected]> Co-authored-by: lhy1024 <[email protected]> Co-authored-by: lhy1024 <[email protected]>
close tikv#7848 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
close tikv#7848 Signed-off-by: ti-chi-bot <[email protected]>
close #7848 Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: lhy1024 <[email protected]> Co-authored-by: lhy1024 <[email protected]> Co-authored-by: lhy1024 <[email protected]>
What problem does this PR solve?
Issue Number: Close #7848
What is changed and how does it work?
Check List
Tests
Release note