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: remove infinite loop for auth in raftRequest #10468

Merged
merged 2 commits into from
Oct 28, 2019

Conversation

jingyih
Copy link
Contributor

@jingyih jingyih commented Feb 12, 2019

Remove auth validation loop in v3_server.raftRequest(). Re-validation when error ErrAuthOldRevision occurs should be handled on client side.

This is a follow up to #10218. The client side implementation is tracked in #10408.

Remove auth validation loop in v3_server.raftRequest(). Re-validation
when error ErrAuthOldRevision occurs should be handled on client side.
@jingyih
Copy link
Contributor Author

jingyih commented Feb 12, 2019

Do we still need to distinguish between raftRequest() and raftRequestOnce()?

@jingyih
Copy link
Contributor Author

jingyih commented Feb 13, 2019

/cc @xiang90

@jingyih
Copy link
Contributor Author

jingyih commented Feb 13, 2019

Just saw there is a failed test TestV3AuthOldRevConcurrent, I will take a look.

@codecov-io
Copy link

codecov-io commented Feb 13, 2019

Codecov Report

Merging #10468 into master will increase coverage by 0.34%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10468      +/-   ##
==========================================
+ Coverage   64.18%   64.53%   +0.34%     
==========================================
  Files         403      403              
  Lines       37956    37953       -3     
==========================================
+ Hits        24362    24492     +130     
+ Misses      11963    11809     -154     
- Partials     1631     1652      +21
Impacted Files Coverage Δ
etcdserver/v3_server.go 72.22% <0%> (-1.03%) ⬇️
client/keys.go 70.35% <0%> (-21.11%) ⬇️
clientv3/auth.go 53.24% <0%> (-6.5%) ⬇️
pkg/testutil/recorder.go 77.77% <0%> (-3.71%) ⬇️
clientv3/ordering/kv.go 82.35% <0%> (-2.95%) ⬇️
pkg/adt/interval_tree.go 84.71% <0%> (-2.51%) ⬇️
etcdserver/api/v3rpc/watch.go 77.45% <0%> (-2.29%) ⬇️
clientv3/retry.go 69.64% <0%> (-1.79%) ⬇️
clientv3/retry_interceptor.go 69.5% <0%> (-1%) ⬇️
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 669cd6b...41539df. Read the comment docs.

@mitake
Copy link
Contributor

mitake commented Feb 13, 2019

@jingyih thanks for handling this! I took a look about the failed test. The failed reason after removing the loop is that simple token always uses the latest revision (see tokenSimple.info()) and it isn't working as a validation mechanism (simple token is just for testing purposes, but probably we should fix it). So the test relies on and checks the wrong validation and retry mechanism.
I think disabling the test for now is ok. After moving the validation to client side, it should be revived. How do you think?

@jingyih
Copy link
Contributor Author

jingyih commented Feb 13, 2019

Thanks @mitake for the explanation. I am worried that we might forget to re-enable the test if we disable it now. Maybe we can keep this PR open until the client side retry get implemented.

@jingyih
Copy link
Contributor Author

jingyih commented Oct 26, 2019

Disable integration test TestV3AuthOldRevConcurrent, until #10408 is fixed.

Disable TestV3AuthOldRevConcurrent for now. See
etcd-io#10468 (comment)
@jingyih
Copy link
Contributor Author

jingyih commented Oct 28, 2019

@mitak @gyuho PTAL.
I think we should get this merged. Once ErrAuthOldRevision happens, this loop will utilize all the CPU resource, as reported in #11033 and #10408.

Copy link
Contributor

@mitake mitake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mitake mitake merged commit 84e2788 into etcd-io:master Oct 28, 2019
jingyih added a commit to jingyih/etcd that referenced this pull request Oct 28, 2019
Disable TestV3AuthOldRevConcurrent for now. See
etcd-io#10468 (comment)
jingyih added a commit that referenced this pull request Nov 6, 2019
…8-upstream-release-3.4

Automated cherry pick of #10468 on release-3.4
YoyinZyc pushed a commit to YoyinZyc/etcd that referenced this pull request Nov 7, 2019
Disable TestV3AuthOldRevConcurrent for now. See
etcd-io#10468 (comment)
wenjiaswe pushed a commit to wenjiaswe/etcd that referenced this pull request Nov 11, 2019
Disable TestV3AuthOldRevConcurrent for now. See
etcd-io#10468 (comment)
jingyih added a commit to jingyih/etcd that referenced this pull request Nov 21, 2019
Disable TestV3AuthOldRevConcurrent for now. See
etcd-io#10468 (comment)
@jingyih jingyih deleted the remove_auth_loop branch January 21, 2020 14:28
mitake added a commit that referenced this pull request Jan 25, 2020
…#10468-upstream-release-3.3

Automated cherry pick of #10218 #10468 on release 3.3
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