-
Notifications
You must be signed in to change notification settings - Fork 726
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
statistic: collect both read and write pending influence at the same time #5521
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 ReportBase: 75.60% // Head: 75.56% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5521 +/- ##
==========================================
- Coverage 75.60% 75.56% -0.05%
==========================================
Files 325 325
Lines 32017 32055 +38
==========================================
+ Hits 24208 24221 +13
- Misses 5722 5737 +15
- Partials 2087 2097 +10
Flags with carried forward coverage won't be shown. Click here to find out 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. |
/run-build-arm64 comment=true |
download pd binary(linux arm64) at http://fileserver.pingcap.net/download/builds/pingcap/test/pd/1cdd39bbbcaa5dac101c3e2d1e81a81bde651cf6/centos7/pd-linux-arm64.tar.gz |
case Read: | ||
return Write | ||
} | ||
return Read |
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 default read?
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.
== Case Write:
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.
there are only two kind in RWType
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.
I think we can panic if not match
infl := statistics.Influence{Loads: make([]float64, statistics.RegionStatCount), Count: 1} | ||
bs.rwTy.SetFullLoadRates(infl.Loads, peer.GetLoads()) | ||
inverse := bs.rwTy.Inverse() | ||
another := bs.GetHotPeerStat(inverse, peer.RegionID, peer.StoreID) |
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.
I prefer summary all loads at a same time (including read and write) in prepareForBalance
, then get it from the stLoadInfos
. it is at a same "snapshot" rather than get it one by one.
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.
Now we don't need to use read and write statistics together. I think we can do this when we unify read and write schedulers later.
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.
yes, it will be placed into together when we unify read and write schedulers.
…time Signed-off-by: lhy1024 <[email protected]>
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.
rest LGTM
if stat := peers.Get(region.GetID()); stat != nil { | ||
return stat.(*HotPeerStat).HotDegree >= hotDegree | ||
if stat := peers.Get(regionID); stat != nil { | ||
return stat.(*HotPeerStat) |
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.
Are there times when there may be insufficient statistical confidence?
/merge |
@HunDunDM: 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. |
This pull request has been accepted and is ready to merge. Commit hash: 1a76711
|
ref #5521, fix #5527 Signed-off-by: lhy1024 <[email protected]> Co-authored-by: 混沌DM <[email protected]>
Signed-off-by: lhy1024 [email protected]
What problem does this PR solve?
Issue Number: Ref #4949
Although there is a
regionPendings
in the hot scheduler, there is only read or write load duringtryAddPendingInfluence
.Hot write scheduler and hot read scheduler may affect each other but cannot be perceived by each other.
What is changed and how it works?
Check List
Tests
Release note