Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
a101d1d3
M
milvus
项目概览
milvus
/
milvus
12 个月 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
a101d1d3
编写于
12月 20, 2021
作者:
C
Cai Yudong
提交者:
GitHub
12月 20, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[skip e2e] Unify component import alias (#13765)
Signed-off-by:
N
yudong.cai
<
yudong.cai@zilliz.com
>
上级
96598ab2
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
69 addition
and
92 deletion
+69
-92
internal/distributed/datacoord/client/client.go
internal/distributed/datacoord/client/client.go
+2
-3
internal/distributed/datacoord/service.go
internal/distributed/datacoord/service.go
+6
-9
internal/distributed/datanode/client/client.go
internal/distributed/datanode/client/client.go
+1
-2
internal/distributed/datanode/service.go
internal/distributed/datanode/service.go
+8
-12
internal/distributed/indexcoord/client/client.go
internal/distributed/indexcoord/client/client.go
+2
-3
internal/distributed/indexcoord/service.go
internal/distributed/indexcoord/service.go
+3
-4
internal/distributed/indexnode/service.go
internal/distributed/indexnode/service.go
+6
-7
internal/distributed/proxy/service.go
internal/distributed/proxy/service.go
+12
-16
internal/distributed/querycoord/service.go
internal/distributed/querycoord/service.go
+9
-12
internal/distributed/querynode/service.go
internal/distributed/querynode/service.go
+8
-11
internal/distributed/rootcoord/service.go
internal/distributed/rootcoord/service.go
+12
-13
未找到文件。
internal/distributed/datacoord/client/client.go
浏览文件 @
a101d1d3
...
...
@@ -20,9 +20,6 @@ import (
"context"
"fmt"
"go.uber.org/zap"
"google.golang.org/grpc"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/proto/commonpb"
"github.com/milvus-io/milvus/internal/proto/datapb"
...
...
@@ -33,6 +30,8 @@ import (
"github.com/milvus-io/milvus/internal/util/paramtable"
"github.com/milvus-io/milvus/internal/util/sessionutil"
"github.com/milvus-io/milvus/internal/util/typeutil"
"go.uber.org/zap"
"google.golang.org/grpc"
)
var
ClientParams
paramtable
.
GrpcClientConfig
...
...
internal/distributed/datacoord/service.go
浏览文件 @
a101d1d3
...
...
@@ -25,11 +25,7 @@ import (
"sync"
"time"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
grpc_opentracing
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
ot
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
grpc_prometheus
"github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/milvus-io/milvus/internal/datacoord"
"github.com/milvus-io/milvus/internal/log"
...
...
@@ -44,6 +40,9 @@ import (
"github.com/milvus-io/milvus/internal/util/paramtable"
"github.com/milvus-io/milvus/internal/util/trace"
"github.com/milvus-io/milvus/internal/util/typeutil"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
)
var
Params
paramtable
.
GrpcServerConfig
...
...
@@ -141,10 +140,8 @@ func (s *Server) startGrpcLoop(grpcPort int) {
grpc
.
KeepaliveParams
(
kasp
),
grpc
.
MaxRecvMsgSize
(
Params
.
ServerMaxRecvSize
),
grpc
.
MaxSendMsgSize
(
Params
.
ServerMaxSendSize
),
grpc
.
UnaryInterceptor
(
grpc_opentracing
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
grpc_opentracing
.
StreamServerInterceptor
(
opts
...
)))
grpc
.
UnaryInterceptor
(
ot
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
ot
.
StreamServerInterceptor
(
opts
...
)))
//grpc.UnaryInterceptor(grpc_prometheus.UnaryServerInterceptor))
datapb
.
RegisterDataCoordServer
(
s
.
grpcServer
,
s
)
grpc_prometheus
.
Register
(
s
.
grpcServer
)
...
...
internal/distributed/datanode/client/client.go
浏览文件 @
a101d1d3
...
...
@@ -20,8 +20,6 @@ import (
"context"
"fmt"
"google.golang.org/grpc"
"github.com/milvus-io/milvus/internal/proto/commonpb"
"github.com/milvus-io/milvus/internal/proto/datapb"
"github.com/milvus-io/milvus/internal/proto/internalpb"
...
...
@@ -30,6 +28,7 @@ import (
"github.com/milvus-io/milvus/internal/util/grpcclient"
"github.com/milvus-io/milvus/internal/util/paramtable"
"github.com/milvus-io/milvus/internal/util/typeutil"
"google.golang.org/grpc"
)
var
ClientParams
paramtable
.
GrpcClientConfig
...
...
internal/distributed/datanode/service.go
浏览文件 @
a101d1d3
...
...
@@ -26,15 +26,10 @@ import (
"sync"
"time"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
ot
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
dn
"github.com/milvus-io/milvus/internal/datanode"
d
s
c
"github.com/milvus-io/milvus/internal/distributed/datacoord/client"
d
c
c
"github.com/milvus-io/milvus/internal/distributed/datacoord/client"
rcc
"github.com/milvus-io/milvus/internal/distributed/rootcoord/client"
grpc_opentracing
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/msgstream"
"github.com/milvus-io/milvus/internal/proto/commonpb"
...
...
@@ -46,6 +41,9 @@ import (
"github.com/milvus-io/milvus/internal/util/paramtable"
"github.com/milvus-io/milvus/internal/util/trace"
"github.com/milvus-io/milvus/internal/util/typeutil"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
)
var
Params
paramtable
.
GrpcServerConfig
...
...
@@ -81,7 +79,7 @@ func NewServer(ctx context.Context, factory msgstream.Factory) (*Server, error)
return
rcc
.
NewClient
(
ctx1
,
etcdMetaRoot
,
etcdEndpoints
)
},
newDataCoordClient
:
func
(
etcdMetaRoot
string
,
etcdEndpoints
[]
string
)
(
types
.
DataCoord
,
error
)
{
return
d
s
c
.
NewClient
(
ctx1
,
etcdMetaRoot
,
etcdEndpoints
)
return
d
c
c
.
NewClient
(
ctx1
,
etcdMetaRoot
,
etcdEndpoints
)
},
}
...
...
@@ -117,10 +115,8 @@ func (s *Server) startGrpcLoop(listener net.Listener) {
grpc
.
KeepaliveParams
(
kasp
),
grpc
.
MaxRecvMsgSize
(
Params
.
ServerMaxRecvSize
),
grpc
.
MaxSendMsgSize
(
Params
.
ServerMaxSendSize
),
grpc
.
UnaryInterceptor
(
grpc_opentracing
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
grpc_opentracing
.
StreamServerInterceptor
(
opts
...
)))
grpc
.
UnaryInterceptor
(
ot
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
ot
.
StreamServerInterceptor
(
opts
...
)))
datapb
.
RegisterDataNodeServer
(
s
.
grpcServer
,
s
)
ctx
,
cancel
:=
context
.
WithCancel
(
s
.
ctx
)
...
...
internal/distributed/indexcoord/client/client.go
浏览文件 @
a101d1d3
...
...
@@ -20,9 +20,6 @@ import (
"context"
"fmt"
"go.uber.org/zap"
"google.golang.org/grpc"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/proto/commonpb"
"github.com/milvus-io/milvus/internal/proto/indexpb"
...
...
@@ -33,6 +30,8 @@ import (
"github.com/milvus-io/milvus/internal/util/paramtable"
"github.com/milvus-io/milvus/internal/util/sessionutil"
"github.com/milvus-io/milvus/internal/util/typeutil"
"go.uber.org/zap"
"google.golang.org/grpc"
)
var
ClientParams
paramtable
.
GrpcClientConfig
...
...
internal/distributed/indexcoord/service.go
浏览文件 @
a101d1d3
...
...
@@ -24,10 +24,6 @@ import (
"sync"
"time"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
ot
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
"github.com/milvus-io/milvus/internal/indexcoord"
"github.com/milvus-io/milvus/internal/log"
...
...
@@ -40,6 +36,9 @@ import (
"github.com/milvus-io/milvus/internal/util/paramtable"
"github.com/milvus-io/milvus/internal/util/trace"
"github.com/milvus-io/milvus/internal/util/typeutil"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
)
var
Params
paramtable
.
GrpcServerConfig
...
...
internal/distributed/indexnode/service.go
浏览文件 @
a101d1d3
...
...
@@ -25,11 +25,7 @@ import (
"sync"
"time"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
grpc_opentracing
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
ot
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
"github.com/milvus-io/milvus/internal/indexnode"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/proto/commonpb"
...
...
@@ -41,6 +37,9 @@ import (
"github.com/milvus-io/milvus/internal/util/paramtable"
"github.com/milvus-io/milvus/internal/util/trace"
"github.com/milvus-io/milvus/internal/util/typeutil"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
)
var
Params
paramtable
.
GrpcServerConfig
...
...
@@ -103,8 +102,8 @@ func (s *Server) startGrpcLoop(grpcPort int) {
grpc
.
KeepaliveParams
(
kasp
),
grpc
.
MaxRecvMsgSize
(
Params
.
ServerMaxRecvSize
),
grpc
.
MaxSendMsgSize
(
Params
.
ServerMaxSendSize
),
grpc
.
UnaryInterceptor
(
grpc_opentracing
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
grpc_opentracing
.
StreamServerInterceptor
(
opts
...
)))
grpc
.
UnaryInterceptor
(
ot
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
ot
.
StreamServerInterceptor
(
opts
...
)))
indexpb
.
RegisterIndexNodeServer
(
s
.
grpcServer
,
s
)
go
funcutil
.
CheckGrpcReady
(
ctx
,
s
.
grpcErrChan
)
if
err
:=
s
.
grpcServer
.
Serve
(
lis
);
err
!=
nil
{
...
...
internal/distributed/proxy/service.go
浏览文件 @
a101d1d3
...
...
@@ -25,16 +25,11 @@ import (
"sync"
"time"
"go.uber.org/zap"
"google.golang.org/grpc"
grpcdatacoordclient
"github.com/milvus-io/milvus/internal/distributed/datacoord/client"
grpcindexcoordclient
"github.com/milvus-io/milvus/internal/distributed/indexcoord/client"
grpcquerycoordclient
"github.com/milvus-io/milvus/internal/distributed/querycoord/client"
ot
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
dcc
"github.com/milvus-io/milvus/internal/distributed/datacoord/client"
icc
"github.com/milvus-io/milvus/internal/distributed/indexcoord/client"
qcc
"github.com/milvus-io/milvus/internal/distributed/querycoord/client"
rcc
"github.com/milvus-io/milvus/internal/distributed/rootcoord/client"
"github.com/milvus-io/milvus/internal/types"
grpc_opentracing
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/msgstream"
"github.com/milvus-io/milvus/internal/proto/commonpb"
...
...
@@ -42,11 +37,14 @@ import (
"github.com/milvus-io/milvus/internal/proto/milvuspb"
"github.com/milvus-io/milvus/internal/proto/proxypb"
"github.com/milvus-io/milvus/internal/proxy"
"github.com/milvus-io/milvus/internal/types"
"github.com/milvus-io/milvus/internal/util/funcutil"
"github.com/milvus-io/milvus/internal/util/paramtable"
"github.com/milvus-io/milvus/internal/util/trace"
"github.com/milvus-io/milvus/internal/util/typeutil"
"github.com/opentracing/opentracing-go"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
)
...
...
@@ -123,10 +121,8 @@ func (s *Server) startGrpcLoop(grpcPort int) {
grpc
.
MaxRecvMsgSize
(
Params
.
ServerMaxRecvSize
),
grpc
.
MaxSendMsgSize
(
Params
.
ServerMaxSendSize
),
grpc
.
MaxRecvMsgSize
(
GRPCMaxMagSize
),
grpc
.
UnaryInterceptor
(
grpc_opentracing
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
grpc_opentracing
.
StreamServerInterceptor
(
opts
...
)))
grpc
.
UnaryInterceptor
(
ot
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
ot
.
StreamServerInterceptor
(
opts
...
)))
proxypb
.
RegisterProxyServer
(
s
.
grpcServer
,
s
)
milvuspb
.
RegisterMilvusServiceServer
(
s
.
grpcServer
,
s
)
...
...
@@ -202,7 +198,7 @@ func (s *Server) init() error {
log
.
Debug
(
"set rootcoord client ..."
)
if
s
.
dataCoordClient
==
nil
{
s
.
dataCoordClient
,
err
=
grpcdatacoordclient
.
NewClient
(
s
.
ctx
,
proxy
.
Params
.
MetaRootPath
,
proxy
.
Params
.
EtcdEndpoints
)
s
.
dataCoordClient
,
err
=
dcc
.
NewClient
(
s
.
ctx
,
proxy
.
Params
.
MetaRootPath
,
proxy
.
Params
.
EtcdEndpoints
)
if
err
!=
nil
{
log
.
Debug
(
"Proxy new dataCoordClient failed "
,
zap
.
Error
(
err
))
return
err
...
...
@@ -218,7 +214,7 @@ func (s *Server) init() error {
log
.
Debug
(
"set data coordinator address ..."
)
if
s
.
indexCoordClient
==
nil
{
s
.
indexCoordClient
,
err
=
grpcindexcoordclient
.
NewClient
(
s
.
ctx
,
proxy
.
Params
.
MetaRootPath
,
proxy
.
Params
.
EtcdEndpoints
)
s
.
indexCoordClient
,
err
=
icc
.
NewClient
(
s
.
ctx
,
proxy
.
Params
.
MetaRootPath
,
proxy
.
Params
.
EtcdEndpoints
)
if
err
!=
nil
{
log
.
Debug
(
"Proxy new indexCoordClient failed "
,
zap
.
Error
(
err
))
return
err
...
...
@@ -234,7 +230,7 @@ func (s *Server) init() error {
log
.
Debug
(
"set index coordinator client ..."
)
if
s
.
queryCooedClient
==
nil
{
s
.
queryCooedClient
,
err
=
grpcquerycoordclient
.
NewClient
(
s
.
ctx
,
proxy
.
Params
.
MetaRootPath
,
proxy
.
Params
.
EtcdEndpoints
)
s
.
queryCooedClient
,
err
=
qcc
.
NewClient
(
s
.
ctx
,
proxy
.
Params
.
MetaRootPath
,
proxy
.
Params
.
EtcdEndpoints
)
if
err
!=
nil
{
return
err
}
...
...
internal/distributed/querycoord/service.go
浏览文件 @
a101d1d3
...
...
@@ -24,12 +24,9 @@ import (
"sync"
"time"
"go.uber.org/zap"
"google.golang.org/grpc"
grpc_opentracing
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
dsc
"github.com/milvus-io/milvus/internal/distributed/datacoord/client"
isc
"github.com/milvus-io/milvus/internal/distributed/indexcoord/client"
ot
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
dcc
"github.com/milvus-io/milvus/internal/distributed/datacoord/client"
icc
"github.com/milvus-io/milvus/internal/distributed/indexcoord/client"
rcc
"github.com/milvus-io/milvus/internal/distributed/rootcoord/client"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/msgstream"
...
...
@@ -43,6 +40,8 @@ import (
"github.com/milvus-io/milvus/internal/util/paramtable"
"github.com/milvus-io/milvus/internal/util/trace"
"github.com/milvus-io/milvus/internal/util/typeutil"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
)
...
...
@@ -153,7 +152,7 @@ func (s *Server) init() error {
// --- Data service client ---
if
s
.
dataCoord
==
nil
{
s
.
dataCoord
,
err
=
d
s
c
.
NewClient
(
s
.
loopCtx
,
qc
.
Params
.
MetaRootPath
,
qc
.
Params
.
EtcdEndpoints
)
s
.
dataCoord
,
err
=
d
c
c
.
NewClient
(
s
.
loopCtx
,
qc
.
Params
.
MetaRootPath
,
qc
.
Params
.
EtcdEndpoints
)
if
err
!=
nil
{
log
.
Debug
(
"QueryCoord try to new DataCoord client failed"
,
zap
.
Error
(
err
))
panic
(
err
)
...
...
@@ -181,7 +180,7 @@ func (s *Server) init() error {
// --- IndexCoord ---
if
s
.
indexCoord
==
nil
{
s
.
indexCoord
,
err
=
i
s
c
.
NewClient
(
s
.
loopCtx
,
qc
.
Params
.
MetaRootPath
,
qc
.
Params
.
EtcdEndpoints
)
s
.
indexCoord
,
err
=
i
c
c
.
NewClient
(
s
.
loopCtx
,
qc
.
Params
.
MetaRootPath
,
qc
.
Params
.
EtcdEndpoints
)
if
err
!=
nil
{
log
.
Debug
(
"QueryCoord try to new IndexCoord client failed"
,
zap
.
Error
(
err
))
panic
(
err
)
...
...
@@ -247,10 +246,8 @@ func (s *Server) startGrpcLoop(grpcPort int) {
grpc
.
KeepaliveParams
(
kasp
),
grpc
.
MaxRecvMsgSize
(
Params
.
ServerMaxRecvSize
),
grpc
.
MaxSendMsgSize
(
Params
.
ServerMaxSendSize
),
grpc
.
UnaryInterceptor
(
grpc_opentracing
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
grpc_opentracing
.
StreamServerInterceptor
(
opts
...
)))
grpc
.
UnaryInterceptor
(
ot
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
ot
.
StreamServerInterceptor
(
opts
...
)))
querypb
.
RegisterQueryCoordServer
(
s
.
grpcServer
,
s
)
go
funcutil
.
CheckGrpcReady
(
ctx
,
s
.
grpcErrChan
)
...
...
internal/distributed/querynode/service.go
浏览文件 @
a101d1d3
...
...
@@ -25,12 +25,8 @@ import (
"sync"
"time"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
grpc_opentracing
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
isc
"github.com/milvus-io/milvus/internal/distributed/indexcoord/client"
ot
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
icc
"github.com/milvus-io/milvus/internal/distributed/indexcoord/client"
rcc
"github.com/milvus-io/milvus/internal/distributed/rootcoord/client"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/msgstream"
...
...
@@ -45,6 +41,9 @@ import (
"github.com/milvus-io/milvus/internal/util/retry"
"github.com/milvus-io/milvus/internal/util/trace"
"github.com/milvus-io/milvus/internal/util/typeutil"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
)
var
Params
paramtable
.
GrpcServerConfig
...
...
@@ -134,7 +133,7 @@ func (s *Server) init() error {
// --- IndexCoord ---
if
s
.
indexCoord
==
nil
{
s
.
indexCoord
,
err
=
i
s
c
.
NewClient
(
s
.
ctx
,
qn
.
Params
.
MetaRootPath
,
qn
.
Params
.
EtcdEndpoints
)
s
.
indexCoord
,
err
=
i
c
c
.
NewClient
(
s
.
ctx
,
qn
.
Params
.
MetaRootPath
,
qn
.
Params
.
EtcdEndpoints
)
if
err
!=
nil
{
log
.
Debug
(
"QueryNode new IndexCoordClient failed"
,
zap
.
Error
(
err
))
panic
(
err
)
...
...
@@ -223,10 +222,8 @@ func (s *Server) startGrpcLoop(grpcPort int) {
grpc
.
KeepaliveParams
(
kasp
),
grpc
.
MaxRecvMsgSize
(
Params
.
ServerMaxRecvSize
),
grpc
.
MaxSendMsgSize
(
Params
.
ServerMaxSendSize
),
grpc
.
UnaryInterceptor
(
grpc_opentracing
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
grpc_opentracing
.
StreamServerInterceptor
(
opts
...
)))
grpc
.
UnaryInterceptor
(
ot
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
ot
.
StreamServerInterceptor
(
opts
...
)))
querypb
.
RegisterQueryNodeServer
(
s
.
grpcServer
,
s
)
ctx
,
cancel
:=
context
.
WithCancel
(
s
.
ctx
)
...
...
internal/distributed/rootcoord/service.go
浏览文件 @
a101d1d3
...
...
@@ -24,15 +24,11 @@ import (
"sync"
"time"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
grpc_opentracing
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
dsc
"github.com/milvus-io/milvus/internal/distributed/datacoord/client"
isc
"github.com/milvus-io/milvus/internal/distributed/indexcoord/client"
ot
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
dcc
"github.com/milvus-io/milvus/internal/distributed/datacoord/client"
icc
"github.com/milvus-io/milvus/internal/distributed/indexcoord/client"
pnc
"github.com/milvus-io/milvus/internal/distributed/proxy/client"
q
s
c
"github.com/milvus-io/milvus/internal/distributed/querycoord/client"
q
c
c
"github.com/milvus-io/milvus/internal/distributed/querycoord/client"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/msgstream"
"github.com/milvus-io/milvus/internal/proto/commonpb"
...
...
@@ -48,6 +44,9 @@ import (
"github.com/milvus-io/milvus/internal/util/sessionutil"
"github.com/milvus-io/milvus/internal/util/trace"
"github.com/milvus-io/milvus/internal/util/typeutil"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
)
var
Params
paramtable
.
GrpcServerConfig
...
...
@@ -108,21 +107,21 @@ func NewServer(ctx context.Context, factory msgstream.Factory) (*Server, error)
func
(
s
*
Server
)
setClient
()
{
s
.
newDataCoordClient
=
func
(
etcdMetaRoot
string
,
etcdEndpoints
[]
string
)
types
.
DataCoord
{
dsClient
,
err
:=
d
s
c
.
NewClient
(
s
.
ctx
,
etcdMetaRoot
,
etcdEndpoints
)
dsClient
,
err
:=
d
c
c
.
NewClient
(
s
.
ctx
,
etcdMetaRoot
,
etcdEndpoints
)
if
err
!=
nil
{
panic
(
err
)
}
return
dsClient
}
s
.
newIndexCoordClient
=
func
(
metaRootPath
string
,
etcdEndpoints
[]
string
)
types
.
IndexCoord
{
isClient
,
err
:=
i
s
c
.
NewClient
(
s
.
ctx
,
metaRootPath
,
etcdEndpoints
)
isClient
,
err
:=
i
c
c
.
NewClient
(
s
.
ctx
,
metaRootPath
,
etcdEndpoints
)
if
err
!=
nil
{
panic
(
err
)
}
return
isClient
}
s
.
newQueryCoordClient
=
func
(
metaRootPath
string
,
etcdEndpoints
[]
string
)
types
.
QueryCoord
{
qsClient
,
err
:=
q
s
c
.
NewClient
(
s
.
ctx
,
metaRootPath
,
etcdEndpoints
)
qsClient
,
err
:=
q
c
c
.
NewClient
(
s
.
ctx
,
metaRootPath
,
etcdEndpoints
)
if
err
!=
nil
{
panic
(
err
)
}
...
...
@@ -244,8 +243,8 @@ func (s *Server) startGrpcLoop(port int) {
grpc
.
KeepaliveParams
(
kasp
),
grpc
.
MaxRecvMsgSize
(
Params
.
ServerMaxRecvSize
),
grpc
.
MaxSendMsgSize
(
Params
.
ServerMaxSendSize
),
grpc
.
UnaryInterceptor
(
grpc_opentracing
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
grpc_opentracing
.
StreamServerInterceptor
(
opts
...
)))
grpc
.
UnaryInterceptor
(
ot
.
UnaryServerInterceptor
(
opts
...
)),
grpc
.
StreamInterceptor
(
ot
.
StreamServerInterceptor
(
opts
...
)))
rootcoordpb
.
RegisterRootCoordServer
(
s
.
grpcServer
,
s
)
go
funcutil
.
CheckGrpcReady
(
ctx
,
s
.
grpcErrChan
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录