-
Notifications
You must be signed in to change notification settings - Fork 696
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
Fix module LatencyAddSample still work when latency-monitor-threshold is 0 #1541
base: unstable
Are you sure you want to change the base?
Conversation
c13ce11
to
dd10fad
Compare
… is 0 When latency-monitor-threshold is set to 0, it means the latency monitor is disabled, and in VM_LatencyAddSample, we wrote the condition incorrectly, causing us to record latency when latency was turned off. Signed-off-by: Binbin <[email protected]>
dd10fad
to
a901e64
Compare
Currently LATENCY LATEST only has the following fields:
I would also like to take it opportunity to discuss, if we can add more fields, like:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1541 +/- ##
============================================
+ Coverage 70.77% 70.95% +0.18%
============================================
Files 120 120
Lines 65005 65006 +1
============================================
+ Hits 46005 46124 +119
+ Misses 19000 18882 -118
|
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.
Great.
When was the bug introduced? Backporting, release notes, etc...
Day 1 bug introduced in 7.2.4 Redis: e3b1d6d3ad |
The PR was merged in 2019, it's a much older bug than that. |
if (server.latency_monitor_threshold && latency >= server.latency_monitor_threshold) | ||
latencyAddSample(event, latency); |
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.
if (server.latency_monitor_threshold && latency >= server.latency_monitor_threshold) | |
latencyAddSample(event, latency); | |
latencyAddSampleIfNeeded(event, latency); |
Optional, I just noticed we have this helper.
When latency-monitor-threshold is set to 0, it means the latency monitor
is disabled, and in VM_LatencyAddSample, we wrote the condition incorrectly,
causing us to record latency when latency was turned off.