etcdserver: learner return Unavailable for unsupported RPC
Make learner return code.Unavailable when the request is not supported by learner. Client balancer will retry a different endpoint.
This commit is contained in:
@ -48,7 +48,6 @@ func newUnaryInterceptor(s *etcdserver.EtcdServer) grpc.UnaryServerInterceptor {
|
||||
return nil, rpctypes.ErrGRPCNotCapable
|
||||
}
|
||||
|
||||
// TODO: add test in clientv3/integration to verify behavior
|
||||
if s.IsLearner() && !isRPCSupportedForLearner(req) {
|
||||
return nil, rpctypes.ErrGPRCNotSupportedForLearner
|
||||
}
|
||||
|
Reference in New Issue
Block a user