-
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
cluster: move stats update into a better place #3901
base: master
Are you sure you want to change the base?
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3901 +/- ##
==========================================
- Coverage 75.61% 75.56% -0.05%
==========================================
Files 329 329
Lines 32965 32984 +19
==========================================
Hits 24925 24925
- Misses 5896 5911 +15
- Partials 2144 2148 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
server/cluster/cluster.go
Outdated
@@ -714,6 +714,11 @@ func (c *RaftCluster) processRegionHeartbeat(region *core.RegionInfo) error { | |||
c.regionStats.Observe(region, c.getRegionStoresLocked(region)) | |||
} | |||
|
|||
// Updates the label level isolation statistics. | |||
if c.labelLevelStats != nil { | |||
c.labelLevelStats.Observe(region, c.getRegionStoresLocked(region), c.opt.GetLocationLabels()) |
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 guess it‘s may cost many CPUs.
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.
+1
I think even if update statistics in heartbeat, it can still lose sync. |
76ffb34
to
64ee28b
Compare
Yes. I decide to leave it in region heartbeat process for now. |
server/cluster/cluster.go
Outdated
// persistLimitRetryTimes is used to reduce the probability of the persistent error | ||
// since the once the store is add or remove, we shouldn't return an error even if the store limit is failed to persist. | ||
defaultStatsJobLimit = 10000 |
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.
The comments above will mismatch.
/run-unit-tests |
661a4d2
to
1c542d4
Compare
/run-unit-tests |
a77a39f
to
07d9360
Compare
/run-all-tests |
81a0ff5
to
5bfd31c
Compare
ada3a48
to
d1f8b55
Compare
d1f8b55
to
305fb50
Compare
305fb50
to
a8ae999
Compare
a8ae999
to
fef450a
Compare
fef450a
to
d6dfc7a
Compare
3c623f2
to
f2127d1
Compare
f2127d1
to
ceafc28
Compare
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
ceafc28
to
48706ab
Compare
Signed-off-by: Ryan Leung <[email protected]>
48706ab
to
d3f1da6
Compare
/hold cancel |
@rleungx: PR needs rebase. 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. |
What problem does this PR solve?
Issue Number: Close #3286, close #3558, close #3199, ref #5648.
What is changed and how does it work?
Check List
Tests
Release note