-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
server: fix learner metric incorrect issue #17176
Conversation
Hi @YaoC. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
82aca90
to
0ecbc56
Compare
/ok-to-test |
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
Thanks!
I believe we should backport this into release/3.4 and release/3.5 |
aae07a5
to
e5ef381
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
Failure test case is related to #17054. |
/retest |
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 - Thanks @YaoC
Can you please add a test? e2e test would be the best. Please let me know if you need help with implementing it. |
2114f0b
to
31340c5
Compare
Thanks @serathius, I've added the e2e tests, PTAL. |
Failed test case may related #16327 |
/retest |
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.
Thanks for adding the tests. Fix is correct, however I would recommend refactoring the code to make the logic more consistent.
I would recommend to move handling of isLearner
under the s.cluster
field. The calls to updateLearnerMetric
you added, should be part of s.cluster.Recover
call. I would recommend to do this cleanup as a followup.
You are right, perhaps I can do it in this PR, it looks better. |
Please feel free to update it in this PR if you want. |
Signed-off-by: YaoC <chengyao09@hotmail.com>
31340c5
to
f7ab7ad
Compare
I moved the metric |
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
Leave to @serathius to take a second look & merge
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
Noticed that we are missing a test for member promotion.
Would appreciate if you could add it as a followup.
Hi @YaoC would you please file pull requests to 3.4 and 3.5 branches? Thanks |
Sure, currently I'm working on these 😄 |
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.
Fix #17175