coordinator: use a healthy region count to start coordinator#7044
coordinator: use a healthy region count to start coordinator#7044ti-chi-bot[bot] merged 25 commits intotikv:masterfrom
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. DetailsReviewer can indicate their review by submitting an approval review. |
|
Skipping CI for Draft Pull Request. |
c5d8bcf to
31e8d61
Compare
31e8d61 to
eb8db24
Compare
d34b261 to
4b862b9
Compare
4b862b9 to
accb06b
Compare
pkg/core/region.go
Outdated
|
|
||
| const ( | ||
| // InDisk means region is stale. | ||
| InDisk RegionSource = iota |
There was a problem hiding this comment.
How about FromLoad or FromStorage?
Signed-off-by: husharp <jinhao.hu@pingcap.com>
Codecov Report
@@ Coverage Diff @@
## master #7044 +/- ##
==========================================
+ Coverage 74.62% 74.69% +0.07%
==========================================
Files 442 442
Lines 47660 47681 +21
==========================================
+ Hits 35565 35615 +50
+ Misses 8972 8947 -25
+ Partials 3123 3119 -4
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: husharp <jinhao.hu@pingcap.com>
18353dc to
6be6f17
Compare
Signed-off-by: husharp <ihusharp@gmail.com>
pkg/core/region_tree.go
Outdated
| } | ||
|
|
||
| func (t *regionTree) AtomicAddStaleRegionCnt() { | ||
| if t.length() == 0 { |
There was a problem hiding this comment.
Why do we need to check the length here?
There was a problem hiding this comment.
Now we do not need to check it after moving staleRegionCnt into regionsInfo
pkg/schedule/prepare_checker.go
Outdated
| return true | ||
| } | ||
| // The number of active regions should be more than total region of all stores * collectFactor | ||
| if float64(c.GetTotalRegionCount())*collectFactor > float64(checker.sum) { |
There was a problem hiding this comment.
maybe it is better to remove them in another pr? This pr just focuses on accelerating coordinator.
What do u think :)
pkg/core/region.go
Outdated
| // FromStorage means this region's meta info might be stale. | ||
| r.AtomicAddStaleRegionCnt() |
There was a problem hiding this comment.
Here we need to make sure that only reload from storage will use CheckAndPutRegion.
There was a problem hiding this comment.
fixed by return regions num
pkg/core/region.go
Outdated
| ) | ||
|
|
||
| // IsSourceStale means this region's meta info might be stale. | ||
| func (r *RegionInfo) IsSourceStale() bool { |
There was a problem hiding this comment.
How about not using stale/fresh? Just use LoadedFromStorage and !LoadedFromStorage. Or something like that.
Signed-off-by: husharp <jinhao.hu@pingcap.com>
9574d70 to
6281684
Compare
|
/merge |
|
@nolouch: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
DetailsInstructions 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. DetailsCommit hash: 6281684 |
|
@HuSharp: 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. DetailsInstructions 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 |
|
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: Close #6988 ,Close #7016
What is changed and how does it work?
FromSyncandFromStorageas the stale regionCheck List
Tests
Release note