Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
49c6eeb0
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,发现更多精彩内容 >>
提交
49c6eeb0
编写于
3月 22, 2021
作者:
D
dragondriver
提交者:
yefu.chen
3月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add useful debug log in proxy
Signed-off-by:
N
dragondriver
<
jiquan.long@zilliz.com
>
上级
23ed14ea
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
428 addition
and
31 deletion
+428
-31
internal/distributed/proxynode/service.go
internal/distributed/proxynode/service.go
+2
-0
internal/proxynode/impl.go
internal/proxynode/impl.go
+404
-28
internal/proxynode/proxy_node.go
internal/proxynode/proxy_node.go
+4
-0
internal/proxynode/task.go
internal/proxynode/task.go
+2
-0
internal/proxyservice/impl.go
internal/proxyservice/impl.go
+10
-2
internal/proxyservice/proxyservice.go
internal/proxyservice/proxyservice.go
+6
-1
未找到文件。
internal/distributed/proxynode/service.go
浏览文件 @
49c6eeb0
...
...
@@ -235,6 +235,8 @@ func (s *Server) init() error {
proxynode
.
Params
.
MasterAddress
=
Params
.
MasterAddress
s
.
proxynode
.
UpdateStateCode
(
internalpb
.
StateCode_Initializing
)
log
.
Debug
(
"proxynode"
,
zap
.
Any
(
"state of proxynode"
,
internalpb
.
StateCode_Initializing
))
if
err
:=
s
.
proxynode
.
Init
();
err
!=
nil
{
log
.
Debug
(
"proxynode"
,
zap
.
String
(
"proxynode init error"
,
err
.
Error
()))
...
...
internal/proxynode/impl.go
浏览文件 @
49c6eeb0
此差异已折叠。
点击以展开。
internal/proxynode/proxy_node.go
浏览文件 @
49c6eeb0
...
...
@@ -66,6 +66,8 @@ func NewProxyNode(ctx context.Context, factory msgstream.Factory) (*ProxyNode, e
msFactory
:
factory
,
}
node
.
UpdateStateCode
(
internalpb
.
StateCode_Abnormal
)
log
.
Debug
(
"proxynode"
,
zap
.
Any
(
"state of proxynode"
,
internalpb
.
StateCode_Abnormal
))
return
node
,
nil
}
...
...
@@ -237,6 +239,8 @@ func (node *ProxyNode) Start() error {
}
node
.
UpdateStateCode
(
internalpb
.
StateCode_Healthy
)
log
.
Debug
(
"proxynode"
,
zap
.
Any
(
"state of proxynode"
,
internalpb
.
StateCode_Healthy
))
log
.
Debug
(
"proxy node is healthy ..."
)
return
nil
...
...
internal/proxynode/task.go
浏览文件 @
49c6eeb0
...
...
@@ -116,6 +116,7 @@ func (it *InsertTask) EndTs() Timestamp {
}
func
(
it
*
InsertTask
)
OnEnqueue
()
error
{
it
.
BaseInsertTask
.
InsertRequest
.
Base
=
&
commonpb
.
MsgBase
{}
return
nil
}
...
...
@@ -514,6 +515,7 @@ func (st *SearchTask) SetTs(ts Timestamp) {
}
func
(
st
*
SearchTask
)
OnEnqueue
()
error
{
st
.
Base
=
&
commonpb
.
MsgBase
{}
return
nil
}
...
...
internal/proxyservice/impl.go
浏览文件 @
49c6eeb0
...
...
@@ -136,9 +136,12 @@ func (s *ProxyService) Init() error {
}
func
(
s
*
ProxyService
)
Start
()
error
{
s
.
stateCode
=
internalpb
.
StateCode_Healthy
s
.
sched
.
Start
()
log
.
Debug
(
"start scheduler ..."
)
defer
func
()
{
s
.
UpdateStateCode
(
internalpb
.
StateCode_Healthy
)
log
.
Debug
(
"proxyservice"
,
zap
.
Any
(
"state of proxyservice"
,
internalpb
.
StateCode_Healthy
))
}()
return
s
.
tick
.
Start
()
}
...
...
@@ -230,6 +233,9 @@ func (s *ProxyService) RegisterLink(ctx context.Context) (*milvuspb.RegisterLink
}
func
(
s
*
ProxyService
)
RegisterNode
(
ctx
context
.
Context
,
request
*
proxypb
.
RegisterNodeRequest
)
(
*
proxypb
.
RegisterNodeResponse
,
error
)
{
log
.
Debug
(
"proxyservice receive RegisterNode request"
,
zap
.
String
(
"ip"
,
request
.
Address
.
Ip
),
zap
.
Int64
(
"port"
,
request
.
Address
.
Port
))
t
:=
&
RegisterNodeTask
{
ctx
:
ctx
,
...
...
@@ -268,7 +274,9 @@ func (s *ProxyService) RegisterNode(ctx context.Context, request *proxypb.Regist
}
func
(
s
*
ProxyService
)
InvalidateCollectionMetaCache
(
ctx
context
.
Context
,
request
*
proxypb
.
InvalidateCollMetaCacheRequest
)
(
*
commonpb
.
Status
,
error
)
{
log
.
Debug
(
"InvalidateCollectionMetaCache"
)
log
.
Debug
(
"proxyservice receive InvalidateCollectionMetaCache request"
,
zap
.
String
(
"db"
,
request
.
DbName
),
zap
.
String
(
"collection"
,
request
.
CollectionName
))
t
:=
&
InvalidateCollectionMetaCacheTask
{
ctx
:
ctx
,
...
...
internal/proxyservice/proxyservice.go
浏览文件 @
49c6eeb0
...
...
@@ -5,6 +5,10 @@ import (
"math/rand"
"time"
"go.uber.org/zap"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
...
...
@@ -39,7 +43,8 @@ func NewProxyService(ctx context.Context, factory msgstream.Factory) (*ProxyServ
s
.
allocator
=
NewNodeIDAllocator
()
s
.
sched
=
NewTaskScheduler
(
ctx1
)
s
.
nodeInfos
=
NewGlobalNodeInfoTable
()
s
.
stateCode
=
internalpb
.
StateCode_Abnormal
s
.
UpdateStateCode
(
internalpb
.
StateCode_Abnormal
)
log
.
Debug
(
"proxyservice"
,
zap
.
Any
(
"state of proxyservice: "
,
internalpb
.
StateCode_Abnormal
))
return
s
,
nil
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录