-
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
Add a new field hash_revision into HashKVResponse #14537
Conversation
Codecov Report
@@ Coverage Diff @@
## main #14537 +/- ##
==========================================
- Coverage 75.61% 75.51% -0.11%
==========================================
Files 457 457
Lines 37320 37325 +5
==========================================
- Hits 28220 28186 -34
- Misses 7331 7362 +31
- Partials 1769 1777 +8
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 |
As mentioned in #14510 (comment) adding the field itself will not improve the user expirience much. It would just change:
to
Still each member returns different hash. If we really want to improve user experience. Let's rethink how |
The etcdctl side change is the next step I will do. |
This isn't a problem. The point is just to let users know the rev for each hash. Of course, we need to enhance |
What's your plan for this ? Pre-fetching revisions and double-lookup on min ? |
The existing logic will not be changed. I will just add the If users clearly set a revision when getting the hashKV, such as If users do not set |
After second thought, I would like to partially adopt @ptabor 's comment above #14537 (comment) . The solution to enhance etcdctl (in a separate PR) would be:
Please let me know if you have any concern or comment. |
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.
@ahrtr thanks, lgtm but I am wondering if you think good idea to add a test coverage for the changes in the corrupt_test.go
? Doing it separately is okay too.
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]>
…'s HashKV request Signed-off-by: Benjamin Wang <[email protected]>
Just rebased this PR in case there are any potential conflicts. |
Added one new field "HashRevision" into HashKVResponse. The field is populated when responding to leader or client's
HashKV
requests. It's the revision up to which the returned hash is calculated.Two reasons why adding this field:
Hash
,CompactRevision
andRevision
), and they are an integral whole. It would be better to return all the three fields to client or other member (e.g. leader).cc @serathius @spzala @ptabor