-
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
etcdserver: update corruption check #14510
Conversation
Codecov Report
@@ Coverage Diff @@
## main #14510 +/- ##
==========================================
- Coverage 75.41% 75.17% -0.24%
==========================================
Files 457 457
Lines 37271 37263 -8
==========================================
- Hits 28109 28014 -95
- Misses 7399 7474 +75
- Partials 1763 1775 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
c07ef77
to
9017ad3
Compare
Signed-off-by: Benjamin Wang <[email protected]>
Run 1. ./script/genproto.sh 2. ./scripts/update_proto_annotations.sh Signed-off-by: Benjamin Wang <[email protected]>
9017ad3
to
3cc0476
Compare
1. get peer's hash using the same revision as the value used by leader; 2. populate HashRevision when responding to leader or client's request. Signed-off-by: Benjamin Wang <[email protected]>
Signed-off-by: Benjamin Wang <[email protected]>
The PR is ready for review. Please review this PR commit by commit. cc @serathius @spzala @ptabor |
Not sure I understand the motivation. Revision is already included in HashKVRequest, so adding it to HashKVResponse seems redundant or could lead to bugs. In what cases you expect that revision in response will not match the request? For me client should always return hash for revision that was requested or return error.
Ok, here I think I get your point. PeriodicCheck pases |
When the client doesn't set the rev (defaults to
|
I can agree that calling It's true that existing consistency checking mechanism is not perfect, and in some cases users would want to manually the confirm the consistency. I however would say this is bad user experience. Instead of making the internal API more user friendly, we should invest into making consistency checks better so user will never need to use |
Thanks for the feedback.
Points from my side:
What do you think? @serathius @spzala @ptabor |
Do you have any comments or concerns on this PR? @serathius @spzala @ptabor |
Don't agree. Users can do many things, but it doesn't mean we need to support every possibility. We need to make assumptions to provide best support for intended paths. It would only result in maintainers spreading too thin. I think that making the feature work is much more important than polishing an internal API.
It works as well without
Don't understand the statement. Please clarify what issue it poses. My understanding that this PR is just a cleanup of API and code. There is no bug that this fixes. |
Thanks for the feedback. Please see my response below.
HashKV is a public API, which was added more than 5 years ago. The related command I also think we should keep supporting the API.
The default
|
In order to move forward, I just broke down this PR into two smaller PRs: |
I can agree that |
Signed-off-by: Benjamin Wang [email protected]
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.
cc @serathius @spzala @ptabor