提交 49c6eeb0 编写于 作者: D dragondriver 提交者: yefu.chen

Add useful debug log in proxy

Signed-off-by: Ndragondriver <jiquan.long@zilliz.com>
上级 23ed14ea
......@@ -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()))
......
此差异已折叠。
......@@ -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
......
......@@ -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
}
......
......@@ -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,
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册