From 7aa6358510935b08bfb01b44cdf26905c066294e Mon Sep 17 00:00:00 2001 From: Jingyi Hu Date: Tue, 12 Feb 2019 15:40:39 -0800 Subject: [PATCH 1/2] etcdserver: remove auth validation loop Remove auth validation loop in v3_server.raftRequest(). Re-validation when error ErrAuthOldRevision occurs should be handled on client side. --- etcdserver/v3_server.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/etcdserver/v3_server.go b/etcdserver/v3_server.go index 74d980961..91cfc98b0 100644 --- a/etcdserver/v3_server.go +++ b/etcdserver/v3_server.go @@ -529,12 +529,7 @@ func (s *EtcdServer) raftRequestOnce(ctx context.Context, r pb.InternalRaftReque } func (s *EtcdServer) raftRequest(ctx context.Context, r pb.InternalRaftRequest) (proto.Message, error) { - for { - resp, err := s.raftRequestOnce(ctx, r) - if err != auth.ErrAuthOldRevision { - return resp, err - } - } + return s.raftRequestOnce(ctx, r) } // doSerialize handles the auth logic, with permissions checked by "chk", for a serialized request "get". Returns a non-nil error on authentication failure. From 41539df490dc1889782f658616903a2ab04ef982 Mon Sep 17 00:00:00 2001 From: Jingyi Hu Date: Fri, 25 Oct 2019 18:27:40 -0700 Subject: [PATCH 2/2] integration: disable TestV3AuthOldRevConcurrent Disable TestV3AuthOldRevConcurrent for now. See https://github.com/etcd-io/etcd/pull/10468#issuecomment-463253361 --- integration/v3_auth_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/integration/v3_auth_test.go b/integration/v3_auth_test.go index 76c73b0ec..d627fbe80 100644 --- a/integration/v3_auth_test.go +++ b/integration/v3_auth_test.go @@ -357,6 +357,7 @@ func TestV3AuthNonAuthorizedRPCs(t *testing.T) { } func TestV3AuthOldRevConcurrent(t *testing.T) { + t.Skip() // TODO(jingyih): re-enable the test when #10408 is fixed. defer testutil.AfterTest(t) clus := NewClusterV3(t, &ClusterConfig{Size: 1}) defer clus.Terminate(t)