Skip to content
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: get peer's hash using the same revision as the value used by leader #14536

Merged
merged 2 commits into from
Sep 30, 2022

Conversation

ahrtr
Copy link
Member

@ahrtr ahrtr commented Sep 29, 2022

Currently the leader uses its latest revision to get peers' hashes, it isn't correct, instead it should use the same revision which it uses to calculate the hash locally. Although it has the same results, but it isn't semantically correct.

cc @serathius @spzala

@codecov-commenter
Copy link

Codecov Report

Merging #14536 (2520c10) into main (d379e62) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main   #14536      +/-   ##
==========================================
- Coverage   75.35%   75.24%   -0.11%     
==========================================
  Files         457      457              
  Lines       37181    37176       -5     
==========================================
- Hits        28017    27974      -43     
- Misses       7405     7435      +30     
- Partials     1759     1767       +8     
Flag Coverage Δ
all 75.24% <100.00%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/etcdserver/corrupt.go 89.26% <100.00%> (-0.18%) ⬇️
client/v3/namespace/watch.go 87.87% <0.00%> (-6.07%) ⬇️
server/etcdserver/api/v3rpc/member.go 93.54% <0.00%> (-3.23%) ⬇️
server/proxy/grpcproxy/watch.go 93.64% <0.00%> (-2.90%) ⬇️
client/v3/leasing/kv.go 89.03% <0.00%> (-1.33%) ⬇️
client/v3/maintenance.go 59.74% <0.00%> (-1.26%) ⬇️
client/v3/op.go 74.71% <0.00%> (-1.15%) ⬇️
server/etcdserver/api/v3rpc/interceptor.go 76.56% <0.00%> (-1.05%) ⬇️
client/v3/client.go 80.12% <0.00%> (-0.95%) ⬇️
client/v3/retry_interceptor.go 66.36% <0.00%> (-0.91%) ⬇️
... and 6 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

get peer's hash using the same revision as the value used by leader

Signed-off-by: Benjamin Wang <[email protected]>
@ahrtr
Copy link
Member Author

ahrtr commented Sep 29, 2022

The PR should be ready to go. Please take a look, thx. cc @spzala @serathius

@ahrtr ahrtr merged commit 62d979b into etcd-io:main Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants