-
Notifications
You must be signed in to change notification settings - Fork 727
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
statistics: fix refactor #1881
statistics: fix refactor #1881
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1881 +/- ##
==========================================
- Coverage 77.89% 77.84% -0.05%
==========================================
Files 161 161
Lines 16070 16069 -1
==========================================
- Hits 12517 12509 -8
- Misses 2557 2558 +1
- Partials 996 1002 +6
Continue to review full report at Codecov.
|
server/statistics/hot_peer_cache.go
Outdated
if interval < hotRegionReportMinInterval && !isExpired { | ||
if oldItem != nil && !isExpired { | ||
// ignore if report too fast or an old report | ||
isOldReport := endTime.After(oldItem.LastUpdateTime) |
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'm a little bit confused about the meaning of isOldReport
, does it mean the report time is before the LastUpdateTime
?
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, my mistake. Fixed.
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.
BTW, do we need to add a test to avoid similar problem
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.
LGTM
/run-all-tests |
@Luffbee merge failed. |
/merge |
Your auto merge job has been accepted, waiting for 1878 |
/run-all-tests |
@Luffbee merge failed. |
/rebuild |
/merge |
/run-all-tests |
What problem does this PR solve?
The previous refactor PR #1750 accidentally removed the change of calculating region flow in PR #1688.
What is changed and how it works?
Fix it and made some upgrade:
PR #1688 only use the report interval to improve the flow rates.
This PR also use report interval to denoise.
Check List
Tests