Refine grpc server options of interceptor (#18943)

Signed-off-by: yun.zhang <yun.zhang@zilliz.com>

Signed-off-by: yun.zhang <yun.zhang@zilliz.com>
This commit is contained in:
jaime 2022-09-01 09:48:58 +08:00 committed by GitHub
parent 237d912625
commit 0e4e7966ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,10 +174,6 @@ func (s *Server) startExternalGrpc(grpcPort int, errChan chan error) {
proxy.UnaryServerInterceptor(proxy.PrivilegeInterceptor),
logutil.UnaryTraceLoggerInterceptor,
)),
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
ot.StreamServerInterceptor(opts...),
grpc_auth.StreamServerInterceptor(proxy.AuthenticationInterceptor),
logutil.StreamTraceLoggerInterceptor)),
}
if Params.TLSMode == 1 {
@ -263,14 +259,8 @@ func (s *Server) startInternalGrpc(grpcPort int, errChan chan error) {
grpc.MaxSendMsgSize(Params.ServerMaxSendSize),
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
ot.UnaryServerInterceptor(opts...),
grpc_auth.UnaryServerInterceptor(proxy.AuthenticationInterceptor),
logutil.UnaryTraceLoggerInterceptor,
)),
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
ot.StreamServerInterceptor(opts...),
grpc_auth.StreamServerInterceptor(proxy.AuthenticationInterceptor),
logutil.StreamTraceLoggerInterceptor,
)),
)
proxypb.RegisterProxyServer(s.grpcInternalServer, s)
milvuspb.RegisterMilvusServiceServer(s.grpcInternalServer, s)