-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 #14414: resilient_server metrics name/prefix logic is inverted, leading to no metrics being recorded #14415
Conversation
logic is inverted, leading to no metrics being recorded Signed-off-by: Jacques Grove <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
@@ -85,7 +85,7 @@ func NewResilientServer(ctx context.Context, base *topo.Server, counterPrefix st | |||
} | |||
|
|||
var metric string | |||
if counterPrefix == "" { | |||
if counterPrefix != "" { |
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.
nit: the else
can be removed.
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.
good find. A small comment for cleanup.
Looks good.
Signed-off-by: Jacques Grove <[email protected]>
There's a test failure here, does the test also expect the incorrect case?
|
Just leaving a note for any others who see this that I'm going to pick this up and fix the tests. |
Signed-off-by: deepthi <[email protected]>
…eading to no metrics being recorded (#14415) Signed-off-by: Jacques Grove <[email protected]> Signed-off-by: deepthi <[email protected]> Co-authored-by: deepthi <[email protected]>
… is inverted, leading to no metrics being recorded (#14415) (#14527) Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: deepthi <[email protected]>
…erted, leading to no metrics being recorded (vitessio#14415) Signed-off-by: Jacques Grove <[email protected]> Signed-off-by: deepthi <[email protected]> Co-authored-by: deepthi <[email protected]>
Description
The logic for the topo resilient server has been apparently broken since it was introduced. I fixed a single test that was mis-named, that led to a panic with this change. I would like to test that the name of the metric is now correct, but the stats module does not make that easy, so something like an end-to-end test would be required, and I do not think this fix justifies that level of effort.
Unnecessary to backport, affects metrics only.
Related Issues
Checklist